The Source for Java Technology Collaboration
User: Password:



Simon Brown

Simon Brown's Blog

Comparing webapp frameworks : Introduction

Posted by simongbrown on November 02, 2005 at 12:21 PM | Comments (9)

Struts, WebWork, Stripes, Spring MVC, Wicket, Tapestry, JSF, etc, or even rolling your own. With so many J2EE web application frameworks to choose from, how do you decide which one to use? Several articles (e.g. JavaServer Faces vs Tapestry) and presentations (e.g. Comparing Web Frameworks) already exist, but they generally concentrate on a small subset of the available frameworks.

Over the next few weeks, I'm going to implement a small web application using as many J2EE web application frameworks that I can get my hands on. I'll be using the resulting code to compare and contrast what the frameworks provide and how they work.

Clearly this is a massive task so, to reduce the scope, I'm going to focus on what it takes to build a read only web application. If I were to hazard a guess, I'd say that the 80-20 rule applies. 80% of a web application is read only and 20% is interactive (e.g. HTML forms, AJAX, etc). Of course, this is changing with technologies like AJAX, but we're still on the upward curve. Traditionally, that 20% is the most complex and is an area where many web application frameworks claim their unique selling points. For this reason, I may iterate over the evaluation process to take into account how the frameworks help web developers build interactive webapps. For now, I'm going to look at whether the frameworks make doing the 80% easy.

In addition to looking at the webapp frameworks, I'm also going to compare and contrast some of the view technologies that are currently available. Here, I'm talking about JSP (normal and XML formats), Velocity, FreeMarker, etc. I think this adds an interesting twist and your choice of view technology may have an impact on your framework decision.

Stay tuned, it should be an interesting journey!


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • So, let me get this right, you will first decide upon a small webapp with certain features and then implement exactly those features in as many web frameworks as possible? Above all that you're only focusing on one tiny little part, the presentation without user interaction towards to server-side? Imho this is a complete waste of time and it will be another biased comparison without any real use whatshowever. Please spend your time on something useful and don't add another confusing hyped comparison to the mix.
    Each framework has its strengths and benefits, so when you are comparing you should in fact first collect all the strengths of each framework (by consulting the authors or users), get use-cases for those features and try implementing these use-cases with the other frameworks too. Like this people will get a much saner image. Many framework authors are at this moment coming together in a (currently private) group to reduce the fragmentation, consolidate as much as possible and educate the users about when to use which framework. If you're interested, contact me at gbevin at uwyn dot com and I'll get you an invitation. Directing your work into this effort would be much more worthwhile.
    A propos, the easy 80% is rarely the problem and often very repetitive. Most of it is even getting totally automated with CRUD frameworks. The interesting bit is the difficult 20%, this is where the actual difficulties lie and where most time is spent.

    Posted by: gbevin on November 02, 2005 at 02:23 PM

  • Hey, that's great! I don't think it's a waste of time at all. You might want to check Michelle Levesque's PyWebOff (http://www.third-bit.com/pyweb/index.html), which chronicles the search for the best among a plethora of Python web frameworks. I'm doing the same thing, and I intend to publish the results online after I'm finished.


    The usefulness of your work will depend on each person who views it. The closer your restrictions and goals are to those of others, the more relevant your findings will be to them. You can't please them all, but don't worry.

    There are quite a number of people out there who are looking for something better in their work as Java web developers. The problem is that they don't have the time, money, or energy to read up on all the docs and/or fully test the alternatives. These people will really appreciate such comparisons; there's a ton of information to wade through out there, and such work gives them footholds and prevents them from drowning in info overload.

    I think your approach is correct; start simple. I believe more users are willing to invest their time in learning frameworks that keep simple tasks simple. In my case, it's more of a human factor than a technical one. As a developer, if a framework makes me jump through five hundred hoops just to do something simple, such as create an announcements page, I'd be less inclined to study that framework. It wouldn't matter whether that framework made more complex tasks very easy; it's the simple things that create a passionate user (http://headrush.typepad.com/creating_passionate_users/) out of me.

    Looking forward to it! Good luck!

    Posted by: shoryuken on November 02, 2005 at 04:08 PM

  • I agree with gbevin. This is a really stupid idea. The 80/20 thing is the most absurd thing I have heard in a long time. Have you ever developed a web application? Because if it's not interactive it's not a web application, it's a web site. If it's read only, then just use a CMS and be done with it, there is no need for a web application framework. 80% of JSF (and just about every other web application framework) is dedicated to managing html forms. DUH!!!!!!!!!!!!! If explore all the frameworks with a read only site, you will only be using 20% of their functionality. A web application may very well be 80% read only, but 80% of the work is building the interactive part, that's why we have 1 billion frameworks to choose from. Here's my suggestion for three use cases:

    - the famous Matt Raible Login Form
    - the Master/Detail page, be sure to make the detail modifiable (i.e. you can edit the detail data)
    - the famous Howard Lewis Ship Hangman game

    Make sure to test exception handling, exception reporting, what happens if a runtime exception is thrown during event processing, etc....

    Posted by: silmendil on November 02, 2005 at 11:55 PM

  • I also think it's a waste of time. Many frameworks sell there idea demonstrating how easy it is to do simple stupid examples. However, when you develop a real project with the framework, you start to find all the ugly stuff... Your approach is much like the comercial one that I wouldn't even waste time reading. The real world is not a simple readonly example. I don't even know if a readonly app should really be called an app at all. Its more like a dinamic web page... Frameworks don't only help developers they also limit them when trying to implement uncommon functionality... you don't get to know a framework by doing a simple example... you get to know it when you have to fight with it's ugly side in a real project. If I wanted to compare frameworls your way I'd visit every one of the frameworks web sites...

    Posted by: necro on November 03, 2005 at 08:58 AM

  • I also agree with the previous statements that your description of your app will be a waste of time. At least do a Petstore-like application, or a similar small ecommerce system.
    Even better would be to build the petstore, and then rate each framework on how easy it is to add certain special features. Which one is the easiest to add a web service in for exchanging inventory data? How about changing the view layer to print out PDFs instead of HTML? Another idea could be changing the store to require being logged in.

    No one cares about how each framework handles simple things.

    Posted by: hexghost on November 03, 2005 at 09:57 AM

  • I would not call it a waste of time; however, you might consider adding the extra 20%. For the most part, the read-only capablities of the most of the frameworks will be similar.

    It's the features like type-conversion from a form field to a complex object. The ease of translating/transporting a model to its view. Those are things that would help other developers decide which framework might suit them better.

    Posted by: digi9ten on November 03, 2005 at 11:07 AM


  • Traditionally, that 20% is the most complex and is an area where many web application frameworks claim their unique selling points. For this reason, I may iterate over the evaluation process to take into account how the frameworks help web developers build interactive webapps.


    Give the guy a break. He's recognized the desire to do more, but even if he stops after the first iteration, there's good value here.

    There are some frameworks that are bad enough to make the easy part really hard, and a first pass will be great for weeding them out. Seeing how hard it is just to get the framework installed and operating is a very valuable litmus test; fail that (and some will), and we don't need to worry about the hard 20%.

    Posted by: erickson on November 03, 2005 at 12:34 PM

  • It ain't about making the easy part easy -- it's about making the hard part easy. Focus on the 20%.

    Posted by: d_syrstad on November 03, 2005 at 03:40 PM

  • Most of the web MVC are to much complex. Thats why Mentawai has been created, to simplify J2EE development, without XML. Check it out!

    Posted by: rubemazenha on November 03, 2005 at 04:43 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds