When Microsoft first introduced WPF (Windows Presentation Foundation) under its codename “Avalon” they said it would become the new rendering system for all of Windows “Longhorn” (the codename for what became “Windows Vista”). Long before Vista’s release, however, Microsoft changed that strategy and decided to make WPF available on Windows XP as well, making it feasible for a much larger range of projects. Microsoft released WPF with .NET 3.0 to a somewhat rocky start because their tool support was -there is no way to sugar coat this-a disaster, with no real WPF UI design tools available initially. Nevertheless, no one has doubted the overall power and promise of the foundation laid by WPF.

Much has changed since then.

Microsoft has since released Visual Studio 2008 as well as Expression Studio 1 and 2. They’ve also released Silverlight, WPF’s Web off-shoot, which is now available in its beta of version 3. Microsoft has released a preview version of Expression Blend 3 and Blend is rapidly becoming a great product that’s a must-have for every UI developer. WPF itself isn’t slacking off either. Microsoft released version 3.5 with VS2008, and has released SP1 for both. WPF 4 is on the horizon with .NET 4.0 and Visual Studio 2010. In fact, Visual Studio 2010 is itself using WPF extensively to provide an improved editing experience. Expression Blend, on the other hand, is entirely built with WPF. So clearly, these technologies are becoming tremendously important for Microsoft not just externally, but for internal development as well.

WPF may have gotten off to a slow start, but it has steadily gained momentum. Silverlight, on the other hand, has caused quite a bit of hype in its own right. It has the spotlight, as it is widely available in the large area of Web development. Developers can use it with Microsoft development products on Microsoft servers, or they can use Silverlight with completely different Web technologies on non-Microsoft platforms.

For WPF, people often ask “Why would I use WPF over WinForms?” In some ways, one could ask the opposite and ask “Why not?” WPF is the latest version of Windows UI development. It is the clear successor to WinForms. Microsoft still supports WinForms but they won’t develop it further. Version 2.0 was the last in its line. Some people question why Microsoft does not develop WinForms further. “Are they not willing to get behind this technology?” some people ask. Nothing could be further from the truth! In fact, they have put so much behind creating a Windows UI technology for .NET, and the changes were so large, that Microsoft ended up giving WinForms 3.0 a new name: WPF! It is the successor to WinForms and should be seen as such. You wouldn’t use ASP.NET 1.1 in Visual Studio 2008, would you? So why would you use WinForms over WPF? Just because the name changed and the improvements are drastic? That seems silly.

Furthermore, WPF also provides some clear advantages over WinForms. The system is more powerful and more flexible. And contrary to WPF skeptic’s statements, WPF is a more productive development environment than WinForms, especially for today’s advanced UI needs. Using WPF is vastly simpler and more straightforward than WinForms was. I am often contacted by developers from around the world, expressing their astonishment as to how powerful, useful, and also productive WPF is once they understand it properly.

However, in fairness, I’ll mention that WPF has a significant learning curve that you must conquer before these benefits start to pay off. (The learning curve is really one of the few valid reasons I can think of for teams to delay implementing projects in whole or in part using WPF.) This is probably why some false perceptions and rumors about WPF’s productivity still seem to be circulating the “Internets.” Nothing could be further from the truth. Once you learn to harness the power and flexibility of WPF-and this is especially true for business applications-you will be blasting along!

Silverlight provides many of the benefits of WPF for the Web. There are trade-offs of course, since Silverlight has to work across platforms and browsers. (Silverlight also runs on Macs and will run on mobile devices in the future.) Silverlight didn’t support true 3D before the beta of version 3 came around. WPF also has vastly superior text layout. Nevertheless, Silverlight enables you to create Web experiences much beyond the most advanced HTML page, regardless of how much AJAX and jQuery you throw in. Silverlight simply allows complete freedom in what you create, while HTML at the end of the day is confined to HTML concepts. Want to create an advanced, high performance data grid? Silverlight is a great way to go. Want to apply a unique look, like giving the grid a slight skew so it leans to one side a little bit? You cannot do that in HTML. You think skewing a UI is a useless exercise? Check out some of my examples at www.MarkusEgger.com/Blogs (look for Silverlight examples), including a video about a business UI that uses a skewed design, which greatly enhances the application.

Note that Silverlight does not replace ASP.NET. Developers will use Silverlight in conjunction with an HTML-based system such as ASP.NET Web Forms or ASP.NET MVC (as well as others). So don’t abandon those HTML and JavaScript skills just yet, but you should certainly add Silverlight to your toolbox.

So what is the “State of WPF & Silverlight”? Both technologies are here for the long run. Silverlight gets a lot of hype and there are quite a number of Silverlight projects under way. WPF is not as visible, as most WPF projects aren’t accessible by pointing a browser at a URL, but based on our consulting and training experiences, I see a number of very large WPF projects on a regular basis, and (even though this might surprise some people) it sure seems like the greater volume of total work comes from WPF rather than Silverlight.

Microsoft makes money by selling Windows desktops. Some people on occasion seem to voice the opinion that Microsoft’s goal is to do away with WPF and support only Silverlight. I think that’s illogical as Microsoft’s main goal is selling Windows and keeping their dominant market share in the operating system and rich client (such as Office) market. Pushing a technology that runs on Macs will not help in achieving that goal. While it may be unavoidable for Microsoft to look beyond Windows, it probably is not what Microsoft is actively pushing for.

The short version of the long story is that regardless of whether you are a .NET Windows or Web developer, you will sooner or later have to (or should I say “have the pleasure to”) deal with either WPF or Silverlight, and most likely both. The only downside of these technologies is the learning curve, which is clearly large, as both technologies represent a paradigm shift. The sooner you start learning these things, the more gradual your approach can be. I promise that you will find both technologies enjoyable to work with, once you obtain a fundamental level of familiarity and comfort.