Guest Opinion

Does WPF Matter?

WPF is an interesting technology with a great deal of future potential, but you face some serious obstacles if you want to use it today.

You might wonder why Microsoft designated the latest iteration of the .NET Framework version 3.0.

A major version number typically indicates a major change to the platform, tool, or technology, but version 3.0 is purely an addition to version 2.0. Nothing changed in the way 2.0 works; Microsoft simply added some new assemblies to the mix.

Don't get me wrong; the new functionality is nice. Windows Communication Foundation brings consistency to the wild world of distributed computing, from both client/server and service-oriented perspectives. And Windows Workflow Foundation offers a more accessible set of capabilities around workflow and orchestration than we've had in the past. Technically .NET 3.0 also includes Windows Card Services, which might become interesting for authentication and authorization if the idea catches on. But none of these .NET add-ons could possibly warrant a major version change.

Then there's the Windows Presentation Foundation (WPF). I have very mixed feelings about WPF, but one thing is clear: This is the first major change to the Windows graphic subsystem in over a decade. And it includes major changes, from the core graphics plumbing all the way up to the programming APIs. In my mind, WPF is the justification for the major version number change in .NET.

The fact that Microsoft has made this substantial investment in the Windows and .NET platforms is great. It means we can (finally!) look forward to escaping the limitations of GDI and GDI+ and move forward with a fully modern, object-oriented, multi-threaded, and three-dimensional UI technology. WPF brings together the best of Windows GUI programming, and the best of the Web's use of markup for describing the UI layout.

Before you get too excited, however, remember that WPF itself is a version 1.0 technology. In terms of maturity and tooling, you can think of it as being like Visual Basic 1.0. It is an interesting technology, with a great deal of future potential, but you'll face some serious obstacles if you want to use it today.

From early on, my consistent feedback to Microsoft has been that the technology is a failure if developers have to learn XAML to use WPF. By that measure, the current release of WPF is not doing well. There'll be some built-in support for XAML in the next version of Visual Studio (code named "Orcas"). And there'll be support in the form of Expression Blend, a designer-focused tool for creating beautiful interfaces. But neither of these tools is good enough in version 1.0 to prevent developers from having to learn XAML.

Visual Studio "Orcas" provides a designer that renders XAML live, but a great many common tasks must be handled by typing XAML by hand (it is easier to type the XAML than to use the designer). Expression Blend makes UI layout and design possible without manually entering XAML, but application concepts like data binding are awkward at best.

This isn't a surprise. XAML is similar to Postscript or HTML: It is a language for use by tools, not people. In the early days of Postscript, I had to learn the language and write Postscript programs to control printers. Similarly, it was necessary to learn HTML in the first few years of programming Web-based applications. There's nothing unusual about an immature technology requiring developers to learn more about the nuts and bolts than they'd like. That is the price we pay to be early adopters.

I fully expect that we'll see WPF and its tools rapidly mature over the next few years. Historically, by version 3.0 of any technology, the maturity achieves a level of sophistication and polish where mainstream adoption becomes cost effective. Personally, I hope WPF bucks the trend and reaches this point sooner because it is very cool technology!

If you like to live on the edge, and you have the time and budget to work through the issues you'll face, WPF is well worth exploring today. Even if you are more conservative about being on the bleeding edge, WPF is a technology to watch closely. It represents the future of Windows UI programming, and possibly the future of Web UI programming as well. In a few years time, we'll all wonder how we got along without WPF.

About the Author

Rockford Lhotka is the author of several books, including the Expert VB and C# 2005 Business Objects books and related CSLA .NET framework. He is a Microsoft Regional Director, MVP and INETA speaker. Rockford is the Principal Technology Evangelist for Magenic, a Microsoft Gold Certified Partner.

comments powered by Disqus

Featured

Subscribe on YouTube