tags:

views:

1741

answers:

5

I have read similiar posts but I it not clear to me.

What I want to create is a Silverlight apps with a few tabs/modules that will all be seperate DLLs.

I see PRISM has the Shell/Module concepts that seem directed towards doing UI and I find a nice demo (showing how to search digg/twitter).

But It sounds like MEF will be included in VS2010 so I would like to go with that option.

Can anyone somehow clearly explain the differences ? (I am not a advanced programmer)

(update 1) So MEF and Unity are basically the same... and PRISM is on top of those concepts and is UI specific...

So the answers seems to be to use PRISM since what I am asking about is building breaking a silverlight app in seperate UI pieces..

Anyone know the future of PRISM development? Is it done or is it continuing?

+1  A: 

Basically, MEF is a general-purpose extensibility framework:

If you are building extensible applications, extensible frameworks and application extensions, then MEF is for you.

whereas Prism is mostly for building GUIs:

The Composite Client Application Guidance is designed to help you more easily build modular Windows Presentation Foundation (WPF) and Silverlight client applications.

Anton Gogolev
+4  A: 

MEF and Prism serve two very distinct goals.

Prism is basically guidance for designing composite applications - where you have a shell and "regions" that are dynamically assigned, and integrated. It includes an IoC container (Unity) that it uses for it's injection.

MEF is a dependency injection framework - it's main goal is to "fill in" depedencies at runtime for an application. In this respect, it's filling the same goal as Unity does within Prism (and, in fact, you could pretty easily rework Prism to use MEF instead of Unity).

Prism fills a broader scope, in some respects, but is also really limited to GUI applications. MEF is just doing one thing (Dep. Injection), but geared to be more general purpose, for any type of application.


Edit in response to update:

As for the lifetime of these products -there is no answer here, but this is kind of how they're being developed:

Prism was developed by the Patterns and Practices team. The goal isn't to necessarily make software, but to provide guidance. As such, they update (although somewhat infrequently) the Prism library and sample, but Prism isn't a core part of the framework shipped by Microsoft. It's really a third party library (even though MS funds a lot of it, most of the P&P people aren't MS FTE).

MEF, from the blog posts, sounds like it is planned to be integrated into the framework, and be used directly inside of MS projects. As such, it's getting heavy development, directly from Microsoft, and being used in their products.

I, personally, have read through the Prism documentation (and have the book), and have gone through the samples. It is very helpful to understand how to break apart an application, but it really is guidance more than a complete, usable framework. The samples are very good at doing what they're designed to do - educate an architect in how to design a composite application.

If your goal is to just keep a clean separation of concerns in a silverlight application, I'd focus more on learning MVVM than necessarily just using Prism.

If you want to use MEF, there are other good options. For example, the WPF Application Framework is an entire MVVM framework built on top of using MEF, and fairly nice.

Reed Copsey
Mixing concerns here a little... Prism's core services have little to do with MVVM... the guidance package pushes MVVM/MVP, but Prism "The Bits" can't be summed up as an MVVM framework.
Anderson Imes
Yes, I agree. I was suggesting that looking at MVVM might be a better focus than necessarily looking at Prism, given the OP's desire to build an app "broken into pieces". I was not trying to suggest that Prism was an MVVM framework.
Reed Copsey
Given your rep around here I thought as much, it just sounded like that. Your edit cleared things up nicely. :)
Anderson Imes
I want to learn both MVVM and Prism.. And understand the basics of the whole DI stuff since I am not a advanced programmer.So it seems to me our next small biz app for our intrnet I will use Prism. It should be educational.
punkouter
+1  A: 

So MEF and Unity are basically the same...

Well, not exactly. MEF is more focused on extensions which aren't known at compile time, while IOC containers generally focus on dependencies which are known at compile time. The top answer to this question gives a good explanation of the differences.

Daniel Plaisted
A: 

Please find the answers of Glenn Block and his teammate about this topic on my blog at http://dotneter.com/?p=18

Hope you find it helpful.

Lan L. Luu

related questions