Shifting Gears

After getting some work started on Orchestra and setting up the initial framework, I decided to step back and look at the possibility of developing the Windows and Web (ASP.NET MVC) versions of the application in parallel. It led me to look for frameworks that is best for this kind of development. With Prism and ASP.NET MVC both relatively new, I’m not surprised that there’s no such thing.

Someone posted a similar question in StackOverflow (“What’s the best way to target both WPF and web apps?“), and there’s no straight “look here!” answer.

After looking at many blog posts about MVVM, MVC, and other presentation patterns, I then thought that maybe I should set up an open-source project in Codeplex that provides a codebase for developers in a similar situation to explore various presentation layer options.

So, ProtoStack was born. I described it this way: “ProtoStack provides a prototype architecture that brings together various presentation patterns (MVVM, MVC, etc.). It is meant to be used in an architectural spike where developers can experiment and learn these patterns and build the foundation for their chosen framework.”

The project will begin with having various presentation layers talking to a common business and data layer, similar to Rockford Lhotka’s CSLA.NET reference implementation, ProjectTracker, except that it is lighter on the business layer side. I will be using the AdventureWorks sample database so that I don’t have to include SQL’s in the project.

The business and data layer will be using Fluent NHibernate, and, since its objective is to provide developers with architectural options, I will be adding other persistence methods to the mix, such as Entity Framework, Linq-to-SQL and even plain old ADO.NET.

Inevitably, there will be some development choices that will have to be made upfront, such as IOC container (Unity) and AOP framework (PostSharp). I might even toss in some Enterprise Library application blocks. The idea is to expose developers to these concepts, while allowing others who are well familiarized with them to make it easy to switch.

I hope that this project will invite peer reviews and generate discussion on which presentation strategy works best on which types of projects.

Composite Application Guidance for WPF a.k.a. Prism

I must have been too busy with transitioning at work, this release escaped my radar. I’ve been playing around with the Smart Client Software Factory for Windows Forms and have gotten to like it. However, I found it quite clunky at times. So, I’m quite thrilled that they decided to rebuild the Composite Applications idea from the ground up, and even rebuilt the CAB-version for it, for WPF.

Prism, which is now called the Composite Application Guidance for WPF, is a more streamlined version of its predecessor. It discontinued its quite rigid approach of using WorkItems and Modules and kept it flexible, while at the same time allowing enough guidance for a best-practice approach.

The download package contains not only the framework but a reference implementation as well. The documentation initiates the user with the patterns involved and offers a good introduction to its technical design. No doubt Microsoft has learned from the user community on the steep learning curve of SCSF.

It’s about time that Patterns & Practices released a Composite Application framework that’s natively WPF. I’ve been waiting for it since the announcement of the now-defunct Acropolis.

(And guess what, now that this version has been released, the P&P guys are now working on the next one, which extends the framework to building composite applications on Silverlight!)