Ask YC: is MVC the best solution?

https://news.ycombinator.com/item?id=80915
by Tichy • 19 years ago
21 19 19 years ago

Somehow my intuition is always a little bit at odds with MVC (as found in current web frameworks). It feels more natural that the view would request the data it needs, especially if it is putting together a mosaic of different sources.

For example, I guess most web applications have some sort of layout view and include the content into it. But what if there are different kinds of things to include? For example there could be a list of logged in users to be displayed in the sidebar, or any number of widgets. It seems unnatural to have to gather the data for those in every controller call.

My experience is with Java frameworks, where usually the flow is through one controller - how does for example Rails deal with that sort of thing? For Java I guess the proposed solution is Portlets, but I haven't seen their wide adaption yet, and they seem to be another headache (those Java specs should be made shorter and more concise).

What is the best solution?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com