(It Just) Has To Be .Net
Two long-term IT techies, with a penchant for Microsoft's .NET Framework, air views on whatever topics take their fancy.

Time to do something real with Windows Presentation Foundation

It’s been a while, but I’ve started work on a new pet project. Significantly, it’s my first foray into Windows Presentation Foundation.

First, some background on the project. Outside of work, my main passion is for photography. I’m on the committee of my local photography club, the Shropshire Photographic Society. An important aspect of the club’s season is the numerous competitions. We have portrait competitions, natural history competitions, ‘open’ competitions and a whole host of others (too many, in my opinion, but that’s something else I’m working on). With the continuing demise of slides and the inevitable upsurge of digital images, attention is turning to how best to operate our competitions to include digital submissions. Handling these digital submissions is the main focus of my efforts, but already, I’ve broadened the scope to include a software solution to handle all of our competitions. By ensuring that the solution can be heavily tailored, I hope to be able to make it available to other clubs. The solution will track competition results, provide the ‘execution’ platform for digital competitions and integrate with our website (itself a .NET 2.0 / DotNetNuke implementation).

But this is a technology blog, not a photography one, so it’s time to start talking about this project from a technology perspective. Although this is a one-man project, I’m determined to do it ‘right’. The primary reason is that I want to use it as a reference implementation for WPF applications. It will have an architecture (albeit a minimal one). I am an architect after all (I checked my business card and it says I am). Now, as usual my timing’s not great. You see, we now have Visual Studio .NET 2008 and .NET Framework 3.5. That’s fine, but there’s an awful lot more to developing great code (particularly if it’s supposed to be ‘Enterprise Ready’). I’m a big fan of Enterprise Library, so I’m going to be using it extensively. But what to use as an Application Framework? I’ve delivered a, frankly, huge .NET 1.1 solution using the far-from-ideal User Interface Process Application Block. I’ve given the Web Client Software Factory a go but as yet, there’s nothing really usable from Microsoft that supports WPF. There was Codename “Acropolis”, a composite application framework targeting WPF. Acropolis itself has been suspended at CTP 1, but rumour is that it will be formally rolled into Service Pack 1 of the .NET framework 3.5. That’s great, but I can’t wait that long. There’s also Prism, which comes from the excellent Patterns & Practices group in the form of guidance (maybe with some supporting tooling?) but that’s evidently in its infancy.

It looks like I’m going to have to roll my sleeves up and create the application framework myself. I’m going to be looking primarily at the Model-View-ViewModel pattern, as opposed to MVC or MVP, as it seems to be more closely aligned to the way in which WPF works. Hopefully, I can keep fairly close to Acropolis/Prism so that it’s a fairly easy migration once Microsoft finally delivers the goods.

So, let’s see how it goes. I’ve got to think big but build small and I feel like there’s a lot to learn. I’m not too proud to leech other people’s work, either, so if you’ve got any suggestions, I’m all ears? ‘til next time...

Posted Apr 15 2008, 09:23 PM by Steve Morgan


Glenn Block wrote re: Time to do something real with Windows Presentation Foundation
on Sun, May 11 2008 7:32


Prism will be releasing end of June.

Steve Morgan 2008. All rights reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems