.NET Fireside Chats: Christopher Bennage on the 'Getting Started with WPF' Refcard
Join the DZone community and get the full member experience.Join For Free
Yesterday, DZone released it's latest Refcard, Getting Started with Windows Presentation Foundation, co-authored by Christopher Bennage and Rob Eisenberg. Together they also authored Sams' Teach Yourself WPF in 24 Hours. We had a chance to ask Christopher a few questions about the Refcard WPF, and his experiences in general.
DZone - Tell us a little about what you do at Blue Spire Consulting.
Christopher Bennage - While we are into all aspects of software development, our focus is generally on user interfaces. We both have a strong interest in game development, and that lends itself readily to exploring user interfaces. We're also heavily influenced by the Agile/Software Craftsmanship community.
DZone - What is WPF? Give us the nickel tour.
Christopher - WPF is a platform for building rich, interactive user interfaces for desktop applications. There are a number significant features such as, a declarative language for composing UI's, a powerful data binding framework, strong animation and media api's, and vector based graphics.
DZone - What are the origins of WPF and XAML?
Christopher - That's an interesting question, and while I haven't asked any of the initial designers of WPF why they choose to build what they did, I do have speculations. I see WPF as the natural consolidation of a number of concepts and technologies that have been growing and maturing independently. I see the influence of HTML and css, as well as technologies like Flash.
DZone - Do you see WPF someday completely replacing WinForms in .NET?
Christopher - "Completely replacing" is a strong phrase. Has WinForms completely replaced older, less agile frameworks for building user interfaces? We know that is hasn't, and I don't think WPF will either. At least not for a long time. However, I do think that it will become the default choice for building new desktop applications. Though this won't happen for many more years. There's a large ecosystem surrounding WinForms, while WPF's is still growing. There is also a significant conceptual shift when it comes to WPF.
DZone - Do you think WPF browser-based applications have a future, or will Silverlight Out-of-Browser apps take over that space?
Christopher - I think that both sides have to mature before a victor can be declared. Silverlight OOB is a beautiful thing, but it is still very primitive in its current form. WPF browser-based apps don't offer much of an advantage over click-once WPF applications. I'm very excited to see where both of these go.
DZone - How are you leveraging WPF in your professional work?
Christopher - As a consulting shop, it's all about bringing value to our clients. WPF has enabled to build solutions quicker, as well as opened up possibilities for interfaces that would have been cost-prohibitive with other technologies.
It is important to note though, that it took us awhile to effectively make use of WPF. One of the breakthroughs for us was discovering how to appropriately use Separated Presentation patterns. I'm little hesitant to call it MVVM, although you could certainly label it that.
DZone - Could you explain the difference between what can be done in Expression Blend vs. Visual Studio when creating a WPF application.
Christopher - In a nutshell, Blend is for XAML and Visual Studio is for code. In practice, I tend to keep both applications open when working on project. I still prefer to write most of my XAML by hand (it is still faster for me) and Visual Studio offers a better experience in that respect. Blend is very good for creating animations and manipulating bits that are more purely graphical (icons, logos, etc.).
DZone - What are some other online resources you would recommend to developers getting into WPF.
Christopher - I highly recommend the tool Kaxaml. It's a free WYSIWYG editor for XAML and it is immensely useful.
I also recommend reading Jeremy Miller's posts regarding Separated Presentation. Jeremy does not discuss these patterns from a WPF perspective, but they are still excellent reading for trying to get a handle on the general concepts.
Rob Eisenberg's Caliburn framework is also something that I recommend exploring, after a user has become familiar with the basics of WPF. Caliburn is an open source project that grew out of a number of WPF and Silverlight projects that we've had.
DZone - Do you have any best practices or recommended patterns for building WPF applications?
Christopher - I do, but I would probably require several pages to list them all out. For beginners, a good place to start is to research the idea of Separated Presentation and the somewhat more idiomatic MVVM (Model-View-ViewModel). This is an area that the community is still working through. I think that we've only just begun to figure out how to make WPF sing. I would also advise that there is no 'one pattern fits all' practices.
As I mentioned earlier, the Caliburn framework is meant to both embody and facilitate a number of best practice.
DZone - Did you find that writing a book on WPF made your work on the Refcard easier?
Christopher - Yes, it did. However, it presented the interesting problem of not plagiarizing ourselves.
DZone - Do you have any future writing projects in the works?
Christopher - Nothing solid at the moment. Unfortunately, writing technical books is not an activity that pays. In fact, it costs money. Nevertheless, I really enjoy it. There are a few possibilities. One idea that I'd like to see happen is a book on best practices for WPF and Silverlight.
Rob Eisenberg is a .NET architect and developer working out of Tallahassee, FL. where he is a partner with Christopher Bennage at Blue Spire Consulting. Rob publishes technical articles regularly at devlicio.us and has spoken at regional events and to companies concerning .NET technologies and Agile software practices. He is coauthor of Sam's Teach Yourself WPF in 24 Hours and is the architect and lead developer of the Caliburn Application Framework for WPF and Silverlight.
Christopher Bennage likes to make things. He's particularly fond of computers, WPF, and Silverlight, as well as the glorious and mysterious field of UX. You can follow him on twitter @bennage or through his blog on devlicio.us. He promises not to bite.
Opinions expressed by DZone contributors are their own.