Taking on WPF

The time has come for me to take on the Mount Everest of .Net 3.0: Windows Presentation Foundation (WPF). A while back I posted a blog entry on my approach to learning Windows Communication Foundation (WCF), so I thought I would do the same for my take on how best to learn WPF.

Before I get started with book recommendations, let me give you my general impression of WPF in comparison with the other big pillar of .Net 3.0, WCF. At the risk of oversimplification, I would say the main story of WCF is that it is mainly a unification of existing distributed computing technologies, while incorporating a set of web service interoperability standards called WS-*. The architecture allows for Service Oriented Architecture (SOA) while decoupling the service contract from the underlying transport protocols.

Windows Presentation Foundation, on the other hand, is all about power, the power to write GUI apps in a way you could not do with the prior presentation technology, which was based ultimately on User32.dll and hasn’t fundamentally changed since the days of Windows 1.0. Windows Forms simply covered that technology with a managed wrapper but was still limited by what happened underneath the wrapper.

For example, User32 placed responsibility for drawing a control on the application, making it possible for the app to hang the UI. In addition, owner draw did not allow for rich composition and layout. WPF instead performs the rendering for you, based on DirectX and vector-based graphics that are resolution-independent. WPF also introduces a declarative programming style that uses XAML (eXtensible Application Markup) to describe how objects are laid out. The big drawback of WPF for the time-being is the lack of adequate developer tool support, which is supposed to relieve the developer from having to write gobs of XML. There is a designer-oriented tool called Expression Blend, but the designer shipping with Visual Studio code-named Orcas this Fall (and now available in Beta 1) has not received rave reviews among developers.

So what are the “best” WPF books out there? I deliberately placed the word “best” in quotation marks, because it really depends on the aim of the book. The surface area of WPF is so expansive that it seems a Quixotic undertaking to try and capture it in “one book to rule them all.” Instead, I recommend reading three books in sequence. Start with Chris Anderson’s Essential Presentation Foundation. Chris works for Microsoft and is a principal architect of WPF. He basically examines WPF from a design perspective, high enough I think to give you a fairly broach picture of the various pieces and how they fit together. From there, I would suggest Programming WPF, Second Edition by Chris Sells and Ian Griffiths. While not yet on bookstore shelves, there is a Rough-Cut version available in PDF format from O’Reilly. Both Chris and Ian are top-notch experts in the field of GUI app development and include Silverlight (code-named WPF/E), Microsoft’s cross-platform answer to Flash. Saving for last what many consider to be the most comprehensive WPF book, I highly recommend Adam Nathan’s WPF Unleashed. I just finished reading it cover-to-cover, and I must say that Adam really leaves no stone unturned when laying out what seems like every feature offered by WPF. Most importantly, the book reflects the fact that Adam rolled up his sleeves and got down-and-dirty with the framework, not only exploring every nook and cranny, but finding and resolving all sorts of gotchas.

So that should be enough to get you started. Have fun, and feel free to post your comments here!

About Tony Sneed

Married with three children.
This entry was posted in Technical. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s