what's the difference between MVVM and Prism v2 - wpf

what's the difference between MVVM and prism v2 design pattern to develop SL and WPF applications?

Prism is not a design pattern, but a Library of different components; some of them can help you implementing the MVVM-pattern, for example with Commanding.

Prism is much more than MVVM, it provides a lot of features/base classes out of the box which you will have to implement yourself in your custom MVVM implementation; Prism provides a standard way of solving various problems/scenarios encountered in SL or WPF application (EventAggregator, Navigation framework, commanding etc.).
Prism is more suitable for large-scale applications which will be maintained/evolved for years by a lot of developers.
MVVM is better suited for light-weight applications which needs to be developed once and quickly. Although if you want flexibility you can develop your own MVVM framework or use available ones(like MVVM light etc.).
Also have a look at this question which I had asked about Prism -
Custom MVVM implementation Vs. PRISM

Related

Difference between Caliburn and Caliburn Micro and how to choose a framework?

I have been looking into developing a new MVVM WPF desktop application and have shortlisted Caliburn and Caliburn.Micro for the same.
I especially like the auto binding properties/methods/View-VMs that you get in Caliburn.
I have previously worked with WPF/MVVM using PRISM (with Unity for DI/IoC).
My requirements are for a small to mid-size, WPF application, nothing fancy.
We don't see any need for Regions or IOC or DI at the moment, but from what I have seen, it does seem to provide support to enable all of these features.
However, something I can't really find is the differences between Caliburn and Caliburn Micro.
Can someone help shape my opinion to make a decision between Caliburn and Caliburn Micro, preferably someone who has exposure to either or both ?
Also, what could be the foreseeable challenges or hurdles for someone moving from PRISM to Caliburn, especially in terms of support and an active knowledgebase or active developer community/user base ?
Would something like MVVM Light better suit us ? Since it gives us the familiarity with PRISM and almost the same user base and support as PRISM. Anything that Caliburn misses out on as compared to MVVM Light ?
How would you make a call between the 2 ? Or rather any of the other exciting Open source frameworks out there like Cinch and Catel ?
Each fx has it's cons and pros, and all answers are highly likely to be subjective. One of the pros of Catel is that you get all these components for free (which are all based on Catel):
http://opensource.wildgums.com/
I use them all the time for building fairly large, maintainable WPF applications.

Need comparison of MVVM / WPF / Silverlight Toolkits

I'm looking for a good article that compares MVVM Light, Caliburn Micro, Prism, and any other Silverlight / WPF / WP7 frameworks out there. I've seen some good articles on them individually, but nothing that really pits them against one another. Any suggestions?
See this article http://www.japf.fr/2009/10/a-quick-tour-of-existing-mvvm-frameworks/
My recomandation if the app is not too big, better use MVVM Light, and after that deppending of your requirements, Prism(Last Version), nRoute, or Caliburn .

which is the best or widely used MVVM Toolkit for WPF?

Could you tell me which is the best MVVM pattern someone have to follow (like Prism). Where can I find hands-on examples to help? Actually, I am little confused which one to follow?
The Wikepedia article about MVVM has a list of frameworks. Here is a selection of some of the frameworks from the list:
Calcium
Caliburn
Cinch
CoreMVVM
MVVM Foundation
MVVM Light Toolkit
WPF Application Framework (WAF)
WPF Model-View-ViewModel Toolkit
Personally, I can recommend Rob Eisenberg's Caliburn. You can see his very educating introduction to MVVM at MIX 2010: Build Your Own MVVM Framework.
A great list of MVVM frameworks can be found at MVVM Framework Explorer.
I don't know what you are exactly mean. MVVM itself is a design pattern. if you mean what are MVVM's best implementations and libraries then some of them are as follow:
WPF MVVM Toolkit: here
Prism
Cinch: here
MVVM Foundation: here
MVVM Light: here
also here you can find a great article about MVVM. I hope these will help you.
MVVM Light and Caliburn are no longer supported, but there is a new player on the market
Microsoft MVVM Toolkit which ist part of the Windows Community Toolkit. It contains the usual support for MVVM and a very fast messaging system.

What WPF frameworks should I use?

I'm a newbie to WPF and I'm developing a brand new windows desktop application and I would like your opinion on what WPF framework I should use. I know this question has been asked before, but the last question was asked at least several months ago. A lot has changed since then.
Right now, I'm using MVVM Light which is more of a library than an actual framework, as the name suggests. I’m looking for something more comprehensive. I prefer a framework that I can use on future WPF projects. Consequently, it should be general purpose and productive.
Any insights or suggestions?
If you are a newby I would suggest that you try to use PLAIN WPF first to get a feeling for it instead of right away extending WPF with other frameworks.
Your title is a bit confusing. WPF is just a graphics/UI layer. WVVM is a Model View ViewModel framework, for implementing a MVVM pattern using WPF ( or Silverlight ).
So, are you asking what design pattern you should use for your WPF application? ( As in MVC, MVVW, MVP, etc... ) Or are you asking which MVVM frameworks are compatible with WPF?
Ugh, acronym soup.
As to my answer, if you are new to WPF and want to learn WPF, I would start with no framework, you can always refactor later once you have a good solid grasp of the underlying technology.
It's definitely on the heavy weight end, and plenty of people will warn you about it, but you seem to be asking for CAG
http://compositewpf.codeplex.com/
It's a pattern that comes with a sample implementation that you can bend into your own. For example, it comes with Unity for IoC, but you should be able to put in another IoC container.
The download comes with a lot of samples for both Silverlight and WPF.
Caliburn (http://caliburn.codeplex.com/) handles a lot of shortcomings of the WPF inherent model (like writing a ton ot stupid routing code for events) and introduces MVVM ;) My bet ;)
You might have a look at the WPF Application Framework (WAF). The sample applications show:
View composition
UI Workflow (Wizards)
Command binding / Shortcut Keys
MVVM pattern, Unit Testing
Validation
Entity Framework
Open/Save FileDialog
Print Preview / Print Dialog
Localization

MVC Frameworks for WPF

Are there any MVC frameworks available for WPF other than Caliburn (which looks awesome btw)?
Both Caliburn and PRISM are very nice. However if you go down the path of MVC you will miss out on the powerful 2 way binding. Consider MVVM, it's a very clean and practical approach for WPF. This is the pattern Microsoft used for their expression blend.
There is also Magellan, a port of ASP.NET MVC for WPF.
There is Composite WPF aka PRISM from Microsoft Pattern & Practices.
http://www.codeplex.com/CompositeWPF
one additional possibility is pureMVC (www.puremvc.org)
it seems well-proven, has good short doc/UML, and the project is responsive, and has been ported to .NET - there exists an WPF demo, it will be published soon but you also can contact the project owner about it.
Regards,
Paul
A new MVC framework that works with practically and .net technology (WebForms, WinForms, WPF, Xamarin Forms) is SimpleMVC by Gateway Programming School. This link gives an overview and example usage.
A short example is to create a controller from SimpleControllerBase that has your business logic. This will depend on the SimpleModelBase implementations you provide. Implementations of ISimpleView are handled through WPF pages and controls. The derived controller only works with the interfaces that extend ISimpleView so that the WPF parts are abstracted away. You then use properties on the view to do two-way data-binding, just like MVVM, but with a proper layered architecture.

Resources