wpfmvvmframeworkssilverlight-4.0prism

Silverlight MVVM vs Prism


I'm a Silverlight newbie. I'm starting a new project and I would like to use existing patterns such as MVVM and PRISM.

Could anyone please guide me through which pattern is better for what type of scenario. And which one is mainly used in Silverlight, please


Solution

  • The PRISM framework is best used for large scale modular projects, especially when the development may span teams. It provides very loose coupling allowing completely independent development of modules which can be downloaded separately or on-demand.

    MVVM is a completely separate issue and can be used with most frameworks. It is basically a pattern for separating the view from the backing data by providing in intermediate object that the view binds against. This separation allows for separate testing of data objects and business logic and not tying up your view with lots of code-behind.

    MVVM is the "most common" as it occurs in multiple frameworks including PRISM (or even with plain old Silverlight with no framework). PRISM is several orders of magnitude more work to learn and implement, but is well worth the effort on large projects.