Is MVVM pattern a symbiote of MVC + PAC patterns?
I've surfed Wikipedia and have found such an article:
http://en.wikipedia.org/wiki/MVC4WPF
A part from the link upper:
MVC4WPF is an open-source, extensible, automated code pattern developed at Information Control Corporation for Windows Presentation Foundation (WPF) development based on the Model-View-Controller (MVC) and Presentation-Abstraction-Control (PAC) patterns...
I know, that WPF/Silverlight do use MVVM pattern: Model-View-ViewModel.
So is MVC4WPF a first version of MVVM?
I don't know the history of WPF/Silverlight development well, but MVVM has always remind me some sort of MVC.
And if it's true, then MVVM = MVC + PAC
?
Whenever I see questions like this, I always think about Dr. WPF's design pattern.
It really doesn't matter what you want to call your separate concerns. You will hear a lot of WPF people talk about MVVM, but all it really boils down to is trying to keep your code separate. In MVVM, you have:
In MVC you have:
Really, the last bit is all that changes (hence Dr. WPF's MV-poo). And in WPF, Bindings in XAML are so nice why would you want to write a bunch of code? Call it whatever you want, it is easier in WPF if the View knows a bit about the poo.
Having never used the PAC pattern, I can't speak to its strengths, but from Wikipedia, it seems to be very similar to MVC. So, I would classify it as a bit of MV-poo.
Now, considering that MVC4WPF hasn't had a release since 2009 (and their website with documentation is down as of 7/6/13), I would suggest you steer clear of it. I can't speak to its strengths or weaknesses, but if you'd like a good MVVM framework, MVVM Light and Caliburn.Micro both have good support and great reviews.
I'd also point out that not all applications need the poo. Mike Hillberg put this nicely.
链接地址: http://www.djcxy.com/p/63368.html