4 ms·
MVC: No Silver Bullet
- stcredzero 17y agoNo silver bullets. To borrow a phrase: The price of the freedom of good architecture is eternal vigilance.
- DanielBMarkham 17y agoAll abstractions are leaky, including design patterns. The trick is knowing when to use them and when not.
- Zak 17y agoNo pattern, framework, programming paradigm or development methodology can work well without smart people writing good code.
- l_frequency 17y agoDjango does a good job of being realistic about what it is doing: "If you’re hungry for acronyms, you might say that Django is a “MTV” framework – that is, “model”, “template”, and “view.” That breakdown makes much more sense." - http://docs.djangoproject.com/en/dev/faq/general/ http://docs.djangoproject.com/en/dev/faq/general/ The article also doesn't mention that MVC is also traditionally used to implement asynchronous UIs, which the web is not suitable for (e.g. there is no push mechanism for the model to update the views. Instead views must use AJAX to poll for updates to model.)
- azgolfer 17y agoI think that it is more of a fractal pattern. For instance, graphics is supposed to be the view layer, but the implementation is full of mathematical equations, which are controller type objects. Ivar Jacobsen says all objects tend to fall into one of the three categories (although IIRC he doesn't use the term MVC).
- dolinsky 17y agoI applaud this user for sticking his neck out to write such an article, but I find it quite lacking. "MVC is designed to solve the problem of simultaneously having multiple control entry points, and multiple display outputs, and it acheives that very elegantly. But web applications only ever have one entry point and one output point - the request and the response. You don't have multiple simultaneous controls or views to worry about, so there's little point applying traditional MVC to solve this non-existant problem. Your application, be it a CGI script, mod_perl handler, or even an all-in-one embedded Perl template, receives one and only one request for any one invocation, and it must generate one and only one response. Flow of control is linear and predicatable." Any web application that can be reached at from a web-enabled phone, a desktop, has API calls to respond to, feeds to deliver and 3rd-party apps to integrate with can hardly be classified as having one entry point and one exit point.