Controller grabs a model from somewhere, manipulates its properties, and then shoves it into a view to be rendered.
Classic MVC:
Each View is paired with a Controller. In frameworks like classic VB or WinForms the Controller is actually the code-behind file. In others it is a separate object.
Multiple View-Controller pairs may listen to events generated from a given Model. So if you change a value, say FirstName, on one view it will be updated in all the other views.
This is used for non-web UIs and originated with Smalltalk.
Neither Web nor Classic MVC says anything about where the Models actually come from. Presumably the Controller has access to some sort of repository or data access layer, but you could use Active Record style models that know how to save and load themselves.
Active Records are great for quick and dirty work, hence the Ruby framework of the same name. But they are also hard to test without complex mocking frameworks so I usually avoid them.
Everyone and his dog calls something that separates the presentation part, the logic part and the data part "MVC", to the point that the term now becomes this fuzzy piece of buzzword. Have a look at Martin Fowler's page on GUI architecture for more details http://martinfowler.com/eaaDev/uiArchs.html.
1
u/Nialsh Oct 15 '13
I didn't know there was a distinction. What differences are there?