With apologies to Marion Zimmer Bradley for her novel, “The Mist of Avalon,” I just couldn’t resist borrowing such a catchy title for this column. :-)
Avalon (I just can’t get myself to call it “Windows Presentation Foundation”) was announced at PDC 2003. Microsoft has made a lot of detailed information available since then. Microsoft introduced XAML (see CoDe Magazine, March/April 2006 for an introductory article) as a new development paradigm. Lots of blog posts, magazine articles, and even books have been written on the subject. And there is no doubt that WPF (there, I said it) and XAML are exciting technologies with lots of potential. But XAML quickly gets overwhelming. While simple examples truly are simple, even UIs of moderate complexity end up as very verbose XAML. Add to that the concepts of styling and resources, and it gets very hard to create, read, and understand the constructs. Pure Avalon isn’t misty; it is seriously cloudy, putting even experienced travelers in serious dangersof getting lost. Frankly, I often feel that I have already seen enough XAML for a lifetime, and the technology hasn’t even shipped yet!
But fear not brave Sir Knight! The fog is lifting. (OK, I may be getting carried away with the Avalon theme a bit here…). At PDC 2005 (two years after the initial announcement of Avalon), Microsoft has announced not one but two editors for XAML and WPF interfaces: “Sparkle” (the codename for what will probably ship as “Microsoft Expression Interactive Designer”… another name I already dread using) and “Cider” (another codename for a tool which’s final name I do not even have a good guess for). Beyond that, third parties are now showing support for WPF: Zam3D, an Electric Rain product (www.erain.com) is setting out to be the tool of choice for 3D UI design tasks. Mobiform Aurora (www.mobiform.com) is more a conventional UI design tool. And these are just two examples.
Why am I telling you about all this now? Because of three important events of the very recent past:
1) In late December 2005, Microsoft released a new CTP (Community Technology Preview) of the WinFX Extensions for Visual Studio. This preview version came with a few surprises. Earlier CTPs of the Visual Studio Extensions for WinFX were a very simple set of project templates that allowed developers to edit and compile XAML files low level as plain XML. The main purpose of the extensions was to enable developers to create a new project that contained the right files and references and to be able to compile these files without having to resort to command line operation. The December CTP, however, is completely different! It represents a full-blown preview version of “Orcas” (the next version of Visual Studio), including “Cider,” the WPF equivalent of the current WinForms editor. You can get the WinFX Extensions for VS2005 from http://msdn.microsoft.com/winfx.
2) In January 2006, Microsoft released the first public beta of Sparkle. Microsoft created Sparkle exclusively for the purpose of creating rich WPF interfaces. Sparkle exists outside the Visual Studio family and instead belongs to the new “Expression Designer” family, which also includes “Acrylic”-a new graphics design tool similar to Adobe Illustrator, but with an emphasis on Avalon as a possible target platform-and “Quartz”-a new design tool for Web pages. Most likely, these three tools will ultimately ship as “Microsoft Expression Graphics Designer”, “Microsoft Expression Interactive Designer”, and “Microsoft Expression Web Designer”. For more information on the Expression product line and to download the betas, visit www.Microsoft.com/Expression.
3) Microsoft announced a “Go-Live License” for some of the WinFX components, in particular WWF (Windows Workflow Foundation) and WCF (Windows Communication Foundation), essentially allowing people to ship products based on the beta versions of the technology. Does it make sense to actually ship software based on beta versions of the underlying technology? Well, it may, and it may not. It will depend on the situation. But it is not as outlandish as it may seem at first. Keep in mind that technology has grown more and more complex. For Microsoft to ship the final version of something like WCF (formerly known as “Indigo”) the core technology has to be ready long before many of the tools and auxiliary technologies are completed. Therefore, shipping software based on the core technology has allure for many developers who are willing to embrace these technologies even without proper tools. Unfortunately, the Go-Live license currently does not include WPF. This has to do with the fact that WPF is a somewhat more complicated undertaking for Microsoft to make sure that they properly support all platforms and graphics cards and configurations. Also, updating a single server with new WCF components is significantly easier than updating a large number of clients. And Microsoft felt that they haven’t had the chance to test WPF appropriately to provide a Go-Live license at this point. However, Microsoft has also stated that a WPF Go-Live License will follow and that means that WPF will be usable much earlier than previously anticipated.
The Development Scenarios
So how should one envision a typical development scenario in the WPF world?
Well, there are multiple distinct approaches. Developers are likely to use Visual Studio “Orcas” and the “Cider” UI designer. Microsoft created the “Cider” designer specifically with the developer in mind. In fact, if you are familiar with Visual Studio’s WinForms designer, you will find many similarities (at least at first sight) between Cider and WinForms. Of course, there are many differences under the hood. In the WPF world, all forms are created based on XAML rather than defining the UI in code. And just the fact that the UI is based on WPF means that the paradigm has changed quite a bit, which you’ll see once you start to poke around. Screen layout is defined quite differently for instance (based on layout controls such as flow panels or grids in addition to absolute positioning). Nevertheless, developers will find similarities to current Windows design environments and they will feel at home here.
Microsoft created Sparkle, on the other hand, with designers in mind. Sparkle has timelines, animations, and transformations. People who have used tools and environments such as Macromedia Flash will feel at home here. However, I have to say that after spending quite a bit of time in Sparkle, I find it a very fascinating product even from the developer’s point of view. (A statement that I would not make about Flash MX.) Sparkle also seems to be quite a bit further along than Cider and I found it more suitable for real-life development at this point. I encourage you to check it out and download the beta!
Note that Sparkle, although not part of Visual Studio, uses the same project and solution structure as Visual Studio. It is therefore possible to move back and forth between the two tools. I prefer Visual Studio’s Cider to write code (at least at this point), but I like Sparkle for the visual design. For this reason I find myself switching back and forth between the two products a lot, and it works very well.
Of course, WPF applications are visually very sophisticated. Some of this sophistication is created through 2-D and 3-D graphics. For all 2-D needs, check out Acrylic (a.k.a. Microsoft Expression Graphics Designer). It is great for creating vector graphics. It is also great for creating pixel graphics. And it is awesome if you need to combine the two. Acrylic creates all important image formats if you want to save your creations as files such as JPGs or PNGs. In addition, Acrylic can create XAML files. So if you ever need your company logo defined purely in XAML, Acrylic is the way to go. I have to admit that I have taken a liking to Acrylic. I now use it for all my imaging needs, including some of the high-quality art we need for CoDe Magazine.
Microsoft does not provide a tool to design 3-D artwork. Zam3D from Electric Rain (www.erain.com) really steps up to the plate here. It provides a very straightforward tool to create relatively sophisticated 3-D graphics and animations. And best of all, not only does it create XAML output that you can use in your WPF projects, but it integrates very well with Sparkle (and presumably Cider at a later point). Of course, Zam3D isn’t a professional 3-D tool like Maya (the kind of tool Industrial Lights and Magic would use to create advanced animations for movies like Shrek). And for most XAML scenarios, Zam3D is much more appropriate and usable than high level 3-D tools. However, when that level of sophistication is needed (and your team has the skills needed to use such tools), then it is possible to integrate art assets from these tools in your WPF projects. However, for most developers, Maya will be a bit of unusable overkill, while Zam3D is a very feasible alternative, both in terms of learning-curve and expense.
Things are getting exciting now! Not too long ago, WPF was science fiction for many developers. It was too far in the future and too difficult to use. Now, seemingly overnight, WPF is very close to being usable reality. Since there is no Go-Live License at this point, you cannot deploy WPF applications today. However, if you have not spent time learning WPF and the tools used to create it (and unless you were on an illustrious inner circle, chances are you didn’t) then the technology has now matured to a point where your time here is well spent. Most likely, if you start learning WPF and Sparkle/Cider today, by the time you are familiar enough with these technologies to deploy applications, Microsoft will announce the Go-Live License for WPF.