5 ms·
The MVC pattern is honestly so simple it or something like it usually emerges from most UI architectures. I would argue that even the increasingly common backen
by ane 11y ago
The MVC pattern is honestly so simple it or something like it usually emerges from most UI architectures. I would argue that even the increasingly common backend vs. frontend separation is a form of MVC. Of course, MVC isn't synonymous with MVC frameworks.
When it comes to pure old MVC, I feel that it is a bit like Greenspun's tenth rule:
> Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
So any UI environment will eventually contain an architecture that more or less embodies the spirit of MVC.
And I think MVC is fine within a single environment. That means, the information travelling from the models to the controllers to the views does not contain intermediary where mediums are crossed. A traditional Rails application crosses from databases to a Ruby program to a web browser, and each bit of logic is dependent of the others.
What makes the backend/frontend separation such a good model is that a front running on a REST API is not inherently dependent on a protocol or a server implementation, and the same applies to the backend. This will work in the post-HTTP world, whenever that comes.
Traditional Rails apps assume they are talking to a web browser. This is assumption is no longer tenable.
- bpicolo 11y agoYep. If you don't have it you're just going to reinvent routing and a database abstraction layer over and over again
- Retric 11y agoPlenty of websites don't need routing. Just like plenty of websites don't need databases. IMO, a problem with frameworks is you start seeing everything in those terms even if say static HTML might be your best option.
- StillBored 11y agoI've the argument a few times that the HTML/CSS/Javascript should never be thought of as more than the V portion of the MVC. I don't tend to gain any converts but I think its a pretty valid perspective.