The direction of data flow in the MVC pattern is
Model -> Controller -> View
so why isn't it called "the MCV pattern"?
Is there something significant about the order of letters in "MVC" or is it merely more mellifluous?
The direction of data flow in the MVC pattern is
Model -> Controller -> View
so why isn't it called "the MCV pattern"?
Is there something significant about the order of letters in "MVC" or is it merely more mellifluous?
MVC rolls off the tongue better.
Plus, and MCV is a Mobile Construction Vehicle, wouldn't want to confuse that.
I think it's more historical. MVC has been in the programming jargon for quite some time and is an established pattern back since some of the earliest versions of SmallTalk. No real reason to change it.
The question presupposes some kind of flow but that isn't the case.
The Model doesn't invoke the Controller. The Controller invokes the Model and the View and there is nothing to stop a view from inspecting the model. MVC just lists the various concerns in no particular order.
MVC was conceived as a general solution to the problem of users controlling a large and complex data set. The hardest part was to hit upon good names for the different architectural components. Model-View-Editor was the first set:
After long discussions, particularly with Adele Goldberg, we ended with the terms Model-View-Controller:
( from http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html )
I think it's mostly how it sounds, but you could also think about it in terms of importance. Clearly the data is the most critical component, followed by how the user interacts with it. The least important part is how the system handles input and prepares the output for display.
The MVC or Model-View-Controller User Interface Paradigm was first described by Trygve Reenskaug of the Xerox PARC. In first appeared in print in Byte magazine volume 6, number 8, in August of 1981.
He included User and called it MVCU. Now that really doesn't roll off the tongue, at least in English. Wonder what is sounds like in Norwegian, Trygve's native tongue.
Why not C-M-V? You start off with a call to a controller method, the method on this controller decides what view to return to you (even if this a default view) and it may or may not consult the model for data and functionality to produce that page view. Ergo C-M-V. Then when the view posts back it is V-C-M-V.
Anyhow, I am plenty happy with MVC. The symbol has been recognized and understood.
what about VMVCV - to indicate how you can use multiple views
It follows the same logic as dates, it's in order of importance.
Compare to dates: Month-Day-Year:
First comes month, the most important number. This most imporantly immediatly infers the season. You immediatly frame the location in time to what we know about it.
Secondly, comes the Day - which is what everyone wants to know. Followed by year.
In MVC, the most important thing is the Model. Model is the king, baby. That's followed by what most people experience, the View. Finally, we have the poor old Controller.
That's according to American logic.
If your thought process follows the large-to-small order of precedence (Year-Month-Day), as I guess most OO programmers' will - then you'll find MCV a more natural name.
Here is my highly scientific, commented, footnoted[1] guess:
+-------+ +------+
| Model | | View |
+-------+ +------+
| |
+------------+
|
+------------+
| Controller |
+------------+
If you read it left to right, it's Model-View-Controller.
[1] I didn't really footnote this[2]
[2] Wait. What? :-)