The first three days of next week are going to be crammed full of announcements as MIX gets under way (click the hyperlink above to view the virtual conference site, where you'll be able to keep up-to-date on everything that's going on). In any big week like this, it's easy for some of the smaller announcements to slip out unnoticed, so I couldn't resist the opportunity to share this one now!
Today, in collaboration with Vertigo Software, I'm pleased to announce the launch of a brand new end-to-end reference sample for WPF. Available for download immediately, Family.Show is a genealogy explorer that allows you to create or import a family tree and explore, annotate or save it to XPS.
We've shipped the source code for a number of demos before, but the bar for a reference application is somewhat higher. The goal here is to show best practices for the construction of an application and to try and include as much reusable code as possible that others can use both to understand the framework and to "borrow" for a real application.
Getting the right scenario is a critical element - it has to be realistic, applicable, provide scope to hit a lot of commonly-used feature areas, and of course, it has to be interesting in its own right. I think we've done that pretty well with this sample:
- It's realistic because there are shrink-wrapped applications for sale today that offer similar functionality;
- It's applicable because it's a data-centric scenario, because the idea of a hierarchical tree is pervasive in many business scenarios (CRM and HR to name just two), it covers data visualization (also a key requirement for many modern business applications), and because it has a well thought out model that keeps data and presentation separate.
- It covers many feature areas: data binding, styling and templates, animation, XML serialization, resources, rich text editing, image manipulation, Windows Vista integration and XPS output.
- It's interesting: everyone has a family story to tell, and having a great tool that imports the GEDCOM standard interchange format for family trees and provides a great way to view that data is something that even passes the "mother test" (does my mother yawn within five seconds of me talking about what I'm doing at work).
The Vertigo guys worked really hard with this application: although they've constructed many reference applications for us before, this was actually their first WPF project. They did a great job with it, and their creative thinking and combination of design and development skills really added to the quality of the finished work.
I won't go through an exhaustive feature list, but I do want to highlight my favorite feature, which is the time slider on the bottom left hand corner of the window. This allows you to go back in time and see the family tree as it existed at an earlier point in history. As people are born or marry into the family, they fade in, which makes this really powerful as a way to share your own family history with others.
The source code is definitely something to peruse in detail. I've often thought that you can tell a really well-designed application because the source code looks more like a work of art than a work of engineering. Here again, Vertigo have delivered really well: from the factoring of the code (check out the class diagram in the solution) to the code itself, this is some of the nicest-looking WPF code I've ever had the pleasure to see. You'll learn more about the way WPF works and the smart ways to use WPF from dissecting this code than you could from reading any book. Check out the class diagram that's included in the Visual Studio solution for a great entry-point into the code.
There's a video coming out shortly (on their site) in which they will talk through their experiences of using the application, and Scott Stanfield (their CEO) is presenting a session on this application at MIX. With the slightly alarming but amusing title of "I See Dead People", it should be a blast - if you're at MIX, make sure you're there!