WPF and Xaml…the next frontier
So most of the time all you hear about nowadays is how awesome the web is, but truth be told, there are a whole lotta developers who never write any code for the web…sad but true.
When people think of business or desktop apps, they think of boring grey boxes that have boring grey buttons on them. If a designer gets really fancy, there might be an icon somewhere. Not the stuff of legend to be sure (but it pays the bills right?).
Enter WPF and Xaml and say goodbye to the boring old grey forms and buttons (rejoice!).
The topic is a little big to dive in head first, so this first article is meant to get our feet wet. I will dive deeper in future articles. Some of you may already know about this stuff, but over the coming months it is going to get more and more prevalent, so I figured it was worth a little refresher.
Also, even if you are a hardcore “anti-Microsoft” type, it is probably worth taking a look at these technologies. Some people call WPF the flash killer. I am not sure about that (still too early to tell really), but love ‘em or hate ‘em, the 800 pound gorilla that is Microsoft always makes a splash.
Onto the intro!
WPF is formally known as the Windows Presentation Foundation (seriously guys, you need better names for this stuff). It will be a big part of the next generation of Visual Studio codenamed “Orcas” (man, even their codenames aren’t any fun). Actually most of it is already available with .NET 3.0, but there aren’t any good tools out yet that support it (although there are some betas).
This stuff is seriously cool. Why? Well, take a look at my little screenshot below. It isn’t much, but that is what a form can look like in WPF without much work. What you can’t see in the screenshot is all the animation. When the app opens the box on the right slides out and the little spotlight looking thing hovers around and behind the form. To do that with a current gen desktop app took either an expensive 3rd party tool, or a heckuva lotta work. I built this form in about an hour, and most of that was just getting used to the tool.

Xaml is part of WPF and is a new language in which you can build user interfaces. On the outside Xaml looks a whole lot like Xml, but it allows developers to essentially code really fancy UIs with relatively little work. Because of its Xml structure, all of the layout and design is put into a single xaml file.
Why does this matter? Well, say you have a blue button. You push the code out to the users. In a app made today to change the button color, change the text, or to move it to another place on the form you would have to open up the code, make your changes, compile, and push the app out again. With Xaml, all the visual goodies are in one place that doesn’t have to be compiled. You open it up, change it, then push out one file and you’re done. MUCH better.
Also, while Xaml is mainly a Microsoft language, there is a push to open it up to use outside of MS technologies (always a good thing)
Here is an example of what Xaml looks like.

On the surface that doesn’t look like a good time at all. However, most of the complexity gets taken away with the new tools that Microsoft is cooking up (notably Blend) and even “Orcas” will allow the creation of these next gen desktop interfaces. In the future, I hope to go a bit more indepth about blend and how it does its thing, but it is how I made the form you see in the screenshot above.
What is also really cool is that a lot of this stuff can be exported to the web with the Microsoft WPF/e libraries (that one stands for Windows Presentation Foundation/Everywhere…another winning name for sure). WPF/e is still really new so I am still wrapping my head around it, but there are some good articles floating around (see below for some).
If you want to know more, there are a ton of good links out there. Blend is still in beta so go on and grab yourself a copy and play around. Here are a few more places to get info.
Top 10 UI Dev Breakthroughs in WPF
Stuff on WPF/e
WPF Community site
Xaml.net
If you have played with some of this stuff and have a demo or two, shoot ‘em over to me and I may use a few screenshots on future articles. Or if you have some good links, those are welcome as well.

