Wednesday, January 20, 2010

What I Learned at PDC - .NET Platform and Extensions (continued)

Composition Manager (MEF) and Construction Manager (Prism)

The Microsoft Patterns and Practices team have built software libraries to help large teams develop large applications. It turns out that these techniques also work well in any application.

MEF stands for Managed Extensibility Framework. This is a technology designed to introduce extensibility points (like Office or web browser plug-ins) into your application. Developing with extensibility in mind lets you think of your application as a platform and can simplify your other development efforts. A well componentized application can be extended after it is deployed by third parties that have special or advanced needs. The technique can foster an ecosystem around the original application, letting others open new markets for your original solution. Glenn Block has a hand in creating MEF and Prism: FT24: Building Extensible Rich Internet Applications with the Managed Extensibility Framework . Listen to the first 5 minutes to understand the problem MEF is solving. Projects can be extended by MEF after initial development, but it is best to think about extension points as you go. Watch the demos first, then circle back to get see how it is done. I love the demo he does 45 minutes into the talk. It shows how MEF can be used to control feature access and deliver functionality on demand. At 50 minutes in you can see a series of demos that have real world application.

Extensibility can also be a competitive advantage. If you expose your application by exposing data services, you may be fostering competition from others to build their own client. Providing extensibility in your own client lets would-be competitors become partners by building extensions that use your data services client plug-ins. A step by step demo on adding MEF to your application is done my Mike Taulty, whom I also had a chance to meet.
Prism is not an acronym for anything -- it is a collection of technology services and constructs that promote loose coupling of software components by introducing a series of “management” object classes. Prism is not really a Microsoft product, so it does not get the marketing push, but anyone who was discussing a rich client application talked about using Prism.

The best guide I have heard, hands down, on Prism is from my friend Eric Mork: Prism Development Guides and Videos. If you follow this link, also sign up for his podcast where he talks technology with many of the experts in the Silverlight community. The commanding feature of Prism is now unnecessary with the addition of ICommand in Silverlight.

No comments: