3 ms·
Re: MVC is well documented, and objectively defined. I'm skeptical. Do you have a link or quote of the "official" definition so we can critique it?
by tabtab 7y ago
Re: MVC is well documented, and objectively defined.
I'm skeptical. Do you have a link or quote of the "official" definition so we can critique it?
- rumanator 7y agoFor example: http://www.math.sfedu.ru/smalltalk/gui/mvc.pdf http://www.math.sfedu.ru/smalltalk/gui/mvc.pdf The pattern is known for having been made popular by Smalltalk. In the 1980s. It makes no sense to assume that a design pattern that has been widely used for, say, 40 years is somehow not described.
- tabtab 7y agoI still haven't found anything that makes a clear distinction between "controller" and "model". The best explanation I've ever heard is that a controller's job is to map UI activity to the proper model and view. That's a start, but there is a lot of grey area there also as determining such can sometimes be complex in itself, which leaves the door open to "fat" controllers.
- johnmaguire2013 7y agoI think the biggest distinction to me is that the controller is the entry-point into an action/routine. It takes external inputs and returns an output to be sent back downstream.
- tabtab 7y agoThat's pretty much true of any function or method.
- johnmaguire2013 7y agoYes, but I'm talking about into the overall system, not into a method.
- justanotherc 7y agoIn many frameworks the controller isn't even the entrypoint anymore though. Laravel for example has a separate router layer, which is the entrypoint that then passes things into a controller.
- tabtab 7y agoIf the controller doesn't fulfill that job, then the model or view model would (for good or bad).
- ptx 7y agoThe problem is just that other later GUI frameworks didn't follow that design. Smalltalk had a controller for each view to handle user input, but Windows doesn't and neither does GTK, Qt or Swing. As Martin Fowler says[1] in his a GUI architecture overview: "As Smalltalk developed in the 80's and 90's this led to some significant variations on the classic MVC model. Indeed one could almost say that MVC disappeared, if you consider the view/controller separation to be an essential part of MVC - which the name does imply." [1] https://martinfowler.com/eaaDev/uiArchs.html https://martinfowler.com/eaaDev/uiArchs.html
- brlewis 7y agoWikipedia is generally good at choosing and citing "official" sources: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93con...