- Posted by christhi on December 5, 2008
When building desktop applications one of the first things you should spend time on is how you would like to compose the application and ask a few questions such as the following:
- Will the application be developed by more than one person?
- Do you want to shell of the application to be loosely coupled from its components or modules (and of each other)?
- Do you want your modules to survive the shell?
- Do you need a seemless means of updating the desktop application to experience a web-like deployment environment?
- Do you want to support online deployments (browser based) as well as installed?
- Do you need to talk to multiple backend components that may speak other languages integrated at the client tier (e.g. portal-like)?
- Do you want a single "pane of glass" to represent one view of the system?
If you answer at least two of these questions with a yes then you should consider Prism 2.0: http://www.codeplex.com/CompositeWPF. I'm always relunctant to call this a framework for building composite applications because of the mental association composite applications get due to some of the perceived compliexities of former technologies. However, Prism is solving this problem in a much cleaner way now and I would not hesitate to suggest that any smart client application at least consider this as a starting point. Too many times I have been approached by customers with rearchitecture challenges such as having to migrate a desktop application to the web or vice versa. Now you can do both and at the same time! Building desktop applications has always been pretty straight forward so jumping to a composite framework was sometimes like pulling teeth. However compare that to the thought you must give to building true RIA applications and I think it is no less difficult to now consider how to build both at the same time. Fortunately Prism provides this and with technologies you care about; WPF and SilverLight.
I will later blog on the details of Prism 2.0 (which now supports leverage assests for building SilverLight and WPF desktop applications at the same time) so for now I just want to get on my soapbox because frankly I'm a little tired of hearing the same old fodder about how composite apps are too difficult or how the composite application block was too slow. After spending several years working with several CAB customers at the Microsoft Technology Center in Austin as "lab rat" I'm very confident on where we are today with "integrating desktop frameworks" such as Prism so I encourage you to check it out. When approached by a customer to build anything that touches the desktop it is the first framework I consider. The same benefits you see from portals such as Sharepoint you can get from integrated desktops or composite applications and portals are here to stay. Remember if done correctly any modules you build can be used independently of the framework and as such good patterns and practices will give you a little insurance policy as well as give you a good night sleep (see MVP for details on what I'm talking about).
For a little history on where integrated desktop applications have come from feel free to check out my previous MSDN article at: http://msdn.microsoft.com/de-de/magazine/cc301266.aspx and good luck.