When searching for MVC explanations and tutorials on Google I went through all links in the first 4 pages (search-term: mvc php) and made notes. I found that MVC is explained in 4 different ways. I understand that in theory they all come down to the same thing but seeing as that most patterns in programming get different names I was wondering why these 4 distinctly different patterns are all know under the same name. (keeping in mind that a 5th pattern using the same methodology is called MVP).
The 4 patterns I found are (hope this comes across correctly as I am hopeless at ASCII art):
U --> C --> M --> V --> U
V --> U
^
|
U --> C <-> M
U
^
|
U --> C --> V <-> M
M <-> V --> U
^ ^
| |
U --> C ----|
Where U = User
MVC is a pattern which is adapted to the environments it’s used in, as such there is no “real” MVC pattern, just the MVC pattern to use in the given environment.
MVC was originally developed in Smalltalk, but smalltalk is a unique language that offers facilities not available in most other languages.
The wikipedia entry for MVC pretty much sums it up.