WPF Here, There and Everywhere (or An Introduction to WPF/E)

There's been some noise recently about WPF Everywhere (or WPF/E), a technology which was announced at PDC05 and Joe Stegman from Microsoft demonstrated at MIX06.  Here I'm going to collect together a few web resources about this technology.

So what is it?  According to Mike Harsh's Blog:

It is a cross-platform, cross-browser web technology that supports a subset of WPF XAML.  WPF/E also has a friction-free install model and the download size we’re targeting is very small.  WPF/E supports programmability through javascript for tight browser integration.  The WPF/E package also contains a small, cross platform subset of the CLR and .NET Framework that can run C# or VB.NET code.

So that sounds interesting, but what can you do with it?  These screenshots are also taken from Mike Harsh's blog:

Here's a transparent vector image with a clock that animates on top of the background.  And it's being displayed in Firefox.

And to show the flexibility of a markup-based UI, here's a simple Notepad type application.  In a browser.  The user can enter some XAML and the WPF/E browser plugin is set to display this via JavaScript.

So this is very interesting, but how simple is it to develop and what can you do with it? Tim Anderson has published a great article which gets into some of the nuts and bolts of developing with WPF/E and outlines some of the things you can and can't do with it.

Interestingly, Microsoft seem to be having a small change of philosophy, as indicated by the "E" in WPF/E.  Specifically, this technology will not be limited to Internet Explorer or the latest incarnation of Windows and will not even be limited to Microsoft operating systems!  Microsoft will be providing a browser plugin which is cross-platform.  They are specifically targetting IE, Safari and Firefox running on Windows 2000, Windows 2003, Windows XP and Windows Vista, as well as Firefox and Safari running Mac OS X.  Apparently they are aiming for a download size of 2MB, so it shouldn't even be too onerous for most users to install.

Of course there is no official release date, but Joe Stegman posted a blog entry on 12 Nov 06 in which he said a CTP will be available "soon".

So a roundup of other useful links:

UPDATE: WPF/E is now better known as Silverlight.  An unusual example of Microsoft changing from a clunky codename to a cool product name!

November 28 2006

An architect is like ... Polyfilla

A colleague insisted that everyone knows what an architect does.  More by nature of a comparison than from wanting to assume the label of "architect", I said "Well, what I do when I join a team is to try and fill whatever holes there are and then do what it takes to ensure delivery".  To which he replied "And that's it in a nutshell".

I find that quite an unsatisfying definition of an architect.  I've met people in the past who are clearly very good architects, in that they can come up with system designs which are incredibly simple and yet solve the business problems at hand in a very powerful way.  I think that someone like this does more than just fill in cracks.


[small print: Polyfilla is a registered trademark of Polycell]

November 27 2006

WSS2: Stsadm.exe removes existing web.config files

I'm writing an installer to install a SharePoint site onto a server and have found some strange behaviour in stsadm.exe.  The relevant portion of my installation goes like this:

  1. Create a new directory
  2. Create an IIS web site on this directory
  3. Deploy my application files into this directory
  4. "Extend" Windows SharePoint Services (WSS) onto this new website

You may think (as I did) that this looks fine.  However, after my installed application started throwing exceptions I looked at the installed file structure and this is what I found:


Hang on, I didn't create the web_2006_11_20_16_8.config file, although it does actually contain my application configuration.  And it also contains the WSS configuration I want to apply.  Some investigation with Sysinternal's ProcMon tool revealed the following:


It turns out that the WSS utility STSADM.EXE (using the extendvs operation) decides to copy the existing web.config file and rename it with a timestamp.  It then goes and creates it own.  How annoying. So now my installation steps are as follows:

  1. Create a new directory
  2. Create an IIS web site on this directory
  3. Deploy my application files into this directory
  4. Deploy my web.config file into a temp directory
  5. "Extend" Windows SharePoint Services (WSS) onto this new website
  6. Copy my web.config file from the temp directory into the application directory

And now it works!

November 20 2006

WiX: Integrating into the continuous build

I've been working on a WiX installer recently and I was asked to integrate it into the project's continuous build process.  This turned out to be surprisingly easy.

Early on in the development, I decided to use WiX version 3.  It is nicely integrated with Visual Studio and has some great property windows for controlling compiler and linker behaviour.  So my development environment for WiX looks like this and I can create my MSI directly from the Build menu (or Ctrl-Shift-B, as I prefer):


The other benefit of WiX 3 is that the main project file (xxx.wixproj) is now actually an MSBuild script (this is a change to prior versions). 

Now our continuous build has CruiseControl.Net calling an MSBuild script (similar to the setup I described in a previous post). This means that once you got the latest binaries and files into the correct folders, getting the WiX project to build is as simple as:

<MSBuild Projects="$(InstallerDirectory)\Installer.wixproj" Targets="Build"/>

How cool is that?

Newer Posts Older Posts