terça-feira, 6 de março de 2012 21:56
For the survey conducted, we see that more and more in applications development, is followed by the MVVM, what are the advantages of this in relation to MVC, since we aremore familiar with MVC (Model-View-Controller)?
I appreciate your opinion,
Todas as Respostas
segunda-feira, 9 de abril de 2012 12:04
Advantages of MVVM over MVC -
1. Increases the "Blendability" of your views (ability to use Expression Blend to design views) – This enables a separation of responsibilities on teams that are lucky enough to have a designer and a programmer... each can work independent of the other.
2. "Lookless" view logic – Views are agnostic from the code that runs behind them, enabling the same view logic to be reused across multiple views or have a view easily retooled or replaced. Seperates concerns between "behavior" and "style".
3. No duplicated code to update views – In code-behind you will see a lot of calls to update view controls. With MVVM you can be assured the view is updated appropriately just by setting the underlying property and all view side-effects thereof.
4. Testability – Since your logic is completely agnostic of your view, unit testing is made easy. You can test the behavior of a ViewModel without involving its view. This also enabled test-driven development of view behavior, which is almost impossible using code-behind.
5. Designer-Developer Workflow – MVVM facilitates a separation of UI and presentation logic concerns from the business layer that makes it easy to streamline the development process by allowing design cycles to happen in parallel with development.
sexta-feira, 13 de abril de 2012 11:42
Both are passive view patterns.
Mvc is used with asp.net.
Mvvm is used with wpf/silverlight and whatever xaml on win8 will be called.
Both offer similar advantages over code behind which are related to separation of concerns.
So the question is a bit strange.
sexta-feira, 13 de abril de 2012 17:30
The MVVM pattern was introduced by Microsoft Architect John Gossman as a WPF and Silverlight specialization of Martin Fowler’s platform-independent Presentation Model (PM) pattern (a variation of MVC).
The key difference is the existence of binding to decouple the 'View Model' from the 'Model'.
In PM the 'Presenter' is referencing the 'View'.
sexta-feira, 13 de abril de 2012 22:03
It comes down to what "application" you are building. MVVM web applications frameworks like KnockoutJS have peculiar advantages including a closer UI centric viewmodel abstracted from HTML and faster page loads when used with MVC4 WebAPI. I suggest reading Addy Osmani's blog on KnockoutJS
domingo, 15 de abril de 2012 07:21
These are the patterns targeted to specific platforms,
MVVM Introduced standard way of leveraging core features of WPF, we can say it is more generalized form of Presentation Model introduced by MartinFowler and tailer-made for WPF or Silverlight.
Hops this helps you...
If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".