Posted by: Joshua on: August 24, 2007
Matt Raible has written a blog entry on choosing web framework by categorizing it into types of application. He wrote 3 category:
With these web-framework that falls on each category:
I agree with him but with minor disagreement with the third category. Because really web 2.0 should be rich whether it is stateless nor stateful. We can add these richness to the webapps by applying AJAX and add CSS to it.
A friend of mine has said that basically there are two category for a web framework and I agree with him
. IMO the category should be narrowed to:
Web Frameworks that falls under these category is: Spring MVC, Struts, Struts2, Stripes
Action based is a perfect choice if we have a web-ness/website in our mind. If URL and action navigation between pages is very important in our web application perhaps we want user to bookmark these URL then we should consider action based framework because we can defined the URL we want to display at browser address bar from the our application configuration. I quite agree with Matt that consumer facing or internet application that is accessed with high traffic is much more relevant using these kind of framework because we need a framework that enable us to defined the URL we want and thin layered between the servlet API so it won’t consume high bandwith. Also we add the richness by decorating our apps with CSS and applying AJAX.
Hey, what about GWT? IMHO GWT falls under the same category with JSF. If GWT is rich client, then where do you put Richfaces or Icefaces? What differs does GWT and Richfaces or Icefaces? I think this should go the same for Flex and Openlazslo too.
To be fair actually it is very difficult to categorize these frameworks as each frameworks sometimes overlaps one another.
Let’s take Struts2 as an example. Struts2 is action framework, but we can also build reusable components with Struts2 as it serves us with API to build our own/custom components. Also IMHO Struts2 is not as thin as any other action web framework if you have lot’s of interceptor configured in your web application. The more interceptor you have, the heavier it will be because it will need to go through all those interceptor first before the applicatin is ready.
And from the component based framework I’ll take tapestry5 as an example. Although it is a component based framework but it is not as heavy as JSF because it is very thin and it loads object lazily when it needs it for the first time. With tapestry5 now the URL that is generated is also very nice, making it suitable to be bookmarked. This also makes tapestry5 IMHO relevant for application that is accessed frequently or public web application.
So this is my opinion. The decision is on your side.
August 24, 2007 at 4:31 pm
I agree with the two categories. But I think a better way of filling them in is simply looking at their programming models. Component oriented frameworks are simply an abstraction higher than action frameworks. This sometimes makes them a little bit harder to work with initially, but they scale much, much better than action based (model 2) frameworks.
Regarding Tapestry5. I can’t comment too much on JSF, but Wicket 1.3 also gives you complete control over the URLs, and enables you to develop ’stateless’ pages which together with deferred session creates makes that Wicket also can be a good choice for public facing web sites.
Regarding GWT… I would definitively place that in the component oriented category.
Flex and Open Lazlo are harder to put in any of these categories.