3 ms·
MVC ≠ What your pet framework does MVC is a descriptive point of view, not a prescriptive implementation plan. It's one of the only software idioms that's actu
by blasdel 17y ago
MVC ≠ What your pet framework does
MVC is a descriptive point of view, not a prescriptive implementation plan. It's one of the only software idioms that's actually an Alexanderian Pattern, unlike the vast majority of the GoF that's just reflective of language warts/features.
There are tons of completely different ways you could describe the web as MVC:
Model View Controller
URL Response Request
DB Response Request
Response Hypermedia Sub-Requests
LocalStorage DOM Javascript
data:// JavaScript DOM Events
...
- regularfry 17y agoI think that the confusion comes from the fact that the original MVC was a prescriptive design pattern, but use of the term has expanded way, way beyond its original intent. For instance, events between M and V are pretty much required if you're doing it the "old way," but people tend to ignore that and just explicitly route messages through the C. The expression carries a lot less meaning now than it used to.
- thmz 17y agoI agree. But that's not the case with this PHP framework (as far as I can tell). They use 'MVC' as structure for there code (or as you call it: prescriptive). And then suddenly a lightweight framework is not that lightweight anymore. So again I agree with your descriptions of the web as MVC, but MVC in a PHP framework only... I still believe that's just a hype word. BTW I don't want to start a flame war about MVC. I just got some question marks about using a PHP 'MVC' framework.
- olliesaunders 17y agoAm I right in saying you think it's bloated because it's superfluous? If that is the case, may I draw your attention to one of the most important reasons for doing request handling within PHP: testability. Were it not for that I would be in complete agreement with you; I have absolutely no time for any framework that does not allow you to construct a mock request object, throw it into the controller, and verify correctness of the response object produced.