views:

279

answers:

6

Most web frameworks are still using the traditional action based MVC model. A controller recieves the request, calls the model and delegates rendering to a template. That is what Rails, Grails, Struts, Spring MVC ... are doing.

The other category, the component based frameworks like Wicket, Tapestry, JSF, or ASP.Net Web Forms have become more popular over the last years, but my perception is that the traditional action based approach is far more popular. And even ASP .Net Web Forms has become a sibling name ASP .Net Web MVC. Edit: Maybe my perception was wrong because of the impression of increasing interest in Wicket. If I ask Google Trends, there is much more growth in the tradional MVC frameworks.

I think the kind of applications built with both types of frameworks is overlapping very much, so the question is: Why are action based frameworks so predominant?

+1  A: 

I believe it's because action-based frameworks give developers (and designers) more control over the appearance of the page. Component-based frameworks try (unsuccessfully, IMHO) to hide the fact that the web is the web. They try to make web programming something like programming a native desktop widget toolkit like WinForms or Cocoa.

But the web is very, very different from that. I think action-based frameworks are popular because they recognize this.

EDIT

Apparently some people have misunderstood what I mean by this, so let me be clear. I'm NOT criticizing web application that appears to users to function like a desktop application. I have absolutely no problem with that.

What I'm talking about is the underlying coding methodology and philosophy. Each tag in a tag library system renders HTML in a certain way, analogous to a widget in a desktop programming library like Cocoa or WinForms. Some systems allow you to customize the rendered HTML, but this can sometimes be non-trivial to accomplish. It will render CSS classes and so on over which you either have little control or have to make a special effort to control. It pretends to be a black-box solution, but it cannot possibly be, because if you want to style the rendered HTML or target it with JavaScript, you have to understand its structure and so on.

Gregory Higley
What's wrong with trying to make WEB desktop-alike apps?
Thevs
@Thevs Nothing. I'm not talking about how the app functions as far as users are concerned. I'm talking about the fact that most tag library systems (particularly ASP.NET) try to mimic the stateful behavior of desktop widget libraries. You also have less -- or less simple -- control over the HTML rendered by the widgets, which can make CSS and occasionally JavaScript harder to do.
Gregory Higley
The point of components is that they *are* a black box. In terms of structure (HTML elements), you don't care - the elements the component uses are those it requires. In terms of styling, the component should provide the maximum amount of sensible style hooks (classes). How you find out about the style hooks depends on the framework - either documentation, or examining the component's markup. If the component is "bad" in either structure or styling, it is a bad component.
ireddick
A: 

I think you only see these frameworks showing all around. But most programmers use in-house (custom) or much more simple framework models (like ExtJS or JQuery) and silently do their job.

EDIT: By the way, I think MVC model is trying to mimc the old and probably obsolete business/presentation separation model which was proposed for legacy applications some time ago. I see no future for this model (2-3 years from now). AJAX is already changing all the way you're working with backend.

Thevs
But what is the back-end for a JavaScript (Ajax) application in the browser?
deamon
I mean the server logic as a back-end, which is called by AJAX request.
Thevs
+2  A: 

Why are things more popular? They are several reasons: because of a good user experience, fast development cycle, cheapest things, etc

But sometimes

the loudest

or most hyped (rails, although it is great ;-))

or most arrogant (apple)

or the things with the most aggressive marketing (microsoft)

will win.

That is called evolution.

BTW: I am with Thevs. The component based frameworks will be the final winners (like GWT/Vaadin or wicket).

Karussell
+6  A: 

the component based frameworks like Wicket, Tapestry, JSF, or ASP.Net Web Forms have become more popular over the last years

[Citation Needed]?

I seriously doubt this claim. MVC has taken over the .Net blog/twitter sphere. Its really hard to find somebody saying "we'll use webforms for our next project".


MVC fits the stateless nature of the web better. Component frameworks are an abstraction web developers didn't want.

jfar
Statelessness is not the sole property of the Web. I've seen many examples of legacy applications working in such mode. Web may be stateful too (cookies, AJAX, etc).
Thevs
Don't know about the others but ASP.Net Webforms is the leakiest possible abstraction over the web there could possibly be. ASP.Net MVC doesn't get in the way and works the way the web works. I think the component based stuff was there to make the draggy-droppy monkeys happy and try to get desktop client devs interested rather than being about making the web easier to work with.
Neal
"MVC fits the stateless nature of the web better. Component frameworks are an abstraction web developers didn't want." Interestingly, this is exactly what I was trying to say, but I got downvoted for it and you didn't. Bravo for phrasing it better than I did.
Gregory Higley
+1  A: 

Inertia. Once you've invested a lot in one technology, it becomes progressively more difficult to change to something better. And it is not 10 times better, because then everyone (even the CEO) would have seen the change is needed.

Stephan Eggermont
+1  A: 

I suspect that developers are using MVC frameworks as a simple way of exposing services, not as action-based web app frameworks (this is pure speculation on my part). i.e. they are using them for AJAX requests. I would predict that the concept of action-based frameworks quietly goes away over the next couple of years, along with (to some extent) the concept of MVC in this context.

ireddick