Earlier quoted context omitted.
my rails apps pass this test with flying colors. Nearly all of my end points have at least 3 views. 1 for html, 1 for json (often used for ajax calls), and 1 for rss/atom.
JSON and RSS views don't make sense - in MVC, views are visual representations of data (the model). Views are how the user percieves the application. JSON and RSS are just different methods for representing data to be communicated to other systems.
MVC is dead, it's time to MOVE on
101–110 of 233 posts
Re: MVC is dead, it's time to MOVE on
#102With a pattern like MVC, where developers implement it again and again, and many of these are junior devs, it's highly likely that people who don't entirely understand the pattern are going to be adding code. The correct use of the pattern is going to get diluted, and certain classes are going to get overstuffed with code that often turns into spaghetti code.
I'm not so sure this is the fault of the junior developers. If there is one "obvious" place to expediently stuff code to implement new functionality then this is actually the fault of original designers. I don't know of any pattern for building applications that doesn't fall into this trap, but I think that one which escapes it is possible through some trick of code organization and programming language technology.
Re: MVC is dead, it's time to MOVE on
#103Earlier quoted context omitted.
my rails apps pass this test with flying colors. Nearly all of my end points have at least 3 views. 1 for html, 1 for json (often used for ajax calls), and 1 for rss/atom.
JSON and RSS views don't make sense - in MVC, views are visual representations of data (the model). Views are how the user percieves the application. JSON and RSS are just different methods for representing data to be communicated to other systems.
We call those, "views".
Re: MVC is dead, it's time to MOVE on
#104MVC, more than other design patterns, is horribly abused. Developers should keep in mind its GUI roots. Here's my "is it MVC?" litmus test: How much of my code survives if I drastically change the view? For example, if I want to switch to a new desktop, web or text console interface, can I reuse much of the application? Of course, architecture changes this significantly (particularly web architecture), but still, if…
Anyway long story short. I don't think the pattern is abused anywhere near as much as the term as been.
Re: MVC is dead, it's time to MOVE on
#105Earlier quoted context omitted.
my rails apps pass this test with flying colors. Nearly all of my end points have at least 3 views. 1 for html, 1 for json (often used for ajax calls), and 1 for rss/atom.
JSON and RSS views don't make sense - in MVC, views are visual representations of data (the model). Views are how the user percieves the application. JSON and RSS are just different methods for representing data to be communicated to other systems.
Re: MVC is dead, it's time to MOVE on
#106Earlier quoted context omitted.
JSON and RSS views don't make sense - in MVC, views are visual representations of data (the model). Views are how the user percieves the application. JSON and RSS are just different methods for representing data to be communicated to other systems.
Users are not necessarily human - they can be search engines, API consumers, etc.
Quote from the inventor of MVC, Trygve Reenskaug:
"The essential purpose of MVC is to bridge the gap between the human user's mental model and the digital model that exists in the computer."
Re: MVC is dead, it's time to MOVE on
#107If your controller has too much logic you should really consider putting more of it in your model and view. Maybe I don't understand MVC, and you all can tell me How Wrong I Am, but here's how I understand MVC at present: Your Model is a public API, a Service Gateway -- and it should do a couple of things in principle. The first is that it should be able to manage a list of subscribed view/controllers, and push updat…
Re: MVC is dead, it's time to MOVE on
#108Earlier quoted context omitted.
my rails apps pass this test with flying colors. Nearly all of my end points have at least 3 views. 1 for html, 1 for json (often used for ajax calls), and 1 for rss/atom.
JSON and RSS views don't make sense - in MVC, views are visual representations of data (the model). Views are how the user percieves the application. JSON and RSS are just different methods for representing data to be communicated to other systems.
I see no purpose for this distinction. A view is an output representation of the model data.
Given the challenge, "How much of my code survives if I drastically change the view?", I think json and rss make perfect sense. They are drastically different output representations of the data.
Re: MVC is dead, it's time to MOVE on
#109Earlier quoted context omitted.
my rails apps pass this test with flying colors. Nearly all of my end points have at least 3 views. 1 for html, 1 for json (often used for ajax calls), and 1 for rss/atom.
JSON and RSS views don't make sense - in MVC, views are visual representations of data (the model). Views are how the user percieves the application. JSON and RSS are just different methods for representing data to be communicated to other systems.
That said, non-HTML output bypasses the view entirely in Rails (it makes sense to), so it can equally be the case that the distinction is correct.