Summary
Matt Raible's presentation comparing six Java Web frameworks is now available online in a video format. The talk, given at the JavaZone conference in Oslo earlier this fall, compares JSF, Spring/MVC, Stripes, Struts 2, Tapestry, and Wicket. Raible also has updated presentation slides that include GWT, Seam, and Flex in the comparison as well.
Advertisement
With the proliferation of Java Web frameworks in recent years comes the difficulty for developers to choose a framework most suited to a task. In a recent presentation at the JavaZone conference earlier this Fall, Matt Raible, author of the AppFuse meta-framework, compares six popular Java Web frameworks. The video of the presentation was recently made available. Raible notes that in choosing which frameworks to compare,
My criteria is... is [the framework] made for the Web developer. What I found was that in Java land there are too many frameworks that are made for the Java developer. But, at the same time, maybe there are too many Java developers that are just Java developers.
But people who develop Web applications in the greater scheme of things... a lot of times they have a team... that does the graphics, that does the CSS, the JavaScript. And some of these frameworks just don't interact with them as well. They take control of everything...
Raible also points out that even though frameworks are popular topics of articles and blog posts, not every Java or Web developer uses a Web framework beyond basic servlets and JSPs, and that some of the most talked-about frameworks are, in fact, not used by all that many developers:
If you read blogs and go to conferences, you'd tend to think that a lot of these frameworks are a lot more popular than they actually are... Some of these frameworks aren't really used by that many people. You just have to be careful when you're reading articles and blogs [about] people saying [that a] framework is so great, and so popular, because, in reality, it isn't. [Some frameworks] may be more popular than others... but in the greater scheme of things, they aren't [that popular].
The frameworks Raible compares are JSF, Spring/MVC, Stripes, Struts 2, Tapestry, and Wicket:
The heavy hitters in Java are Struts 1, Spring MVC, Tapestry, and JSF. Those are the ones used by the most number of people. WebWork ... was one of these elegant frameworks that only a small number of people used. Since it merged with the Struts project, which has become Struts 2, it's getting a lot more exposure... Stripes and Wicket, I added those because so many people commented on my blog, [asking if] I have tried those. I found that they were pretty nice. I was able to learn each of these [to a level] to be productive in about eight hours.
[The comparison is] written very much from a developer's perspective, not from the perspective of a company adopting a framework. It's very different when a company adopts a framework versus when a team of developer adopt a framework...
Raible also provides updated presentation slides on his Web site that include GWT, Seam, and Flex as well:
While creating the 2nd presentation, I found a couple things that surprised me. The first is how popular Flex is - not only in job listings, but also in skilled developers and mailing list traffic. Below is a graph that shows how there aren't many jobs for most of the frameworks, but there's lots for Flex.
What do you think of Raible's comparison and of his choice of frameworks?
I have mixed feelings about the presentation. I think Matt does an excellent job of comparing the frameworks and he really "gets it" about JSF.
On the other hand, the time for Java web frameworks is clearly on the decline. It is hard to imagine using Java for a large web project in 2007 unless the project is using OtherPeople'sMoney.
Ruby on Rails is widely seen as five to ten times as productive as Java for developing web apps. Native Ruby 1.8 is slow, though for many web applications scalability is more important than speed. With Sun now supporting JRuby the obvious platform for a bleeding edge green field web project today is JRuby/Rails. I am a big fan of Java but I can't imagine signing onto a Java web project in 2007. It just seems so clunky and unnecessarily complex.
Jobs requiring JSP within 50 miles of my house on Jobserve today – 94 Jobs requiring Ruby within 50 miles of my house today – 6. Conclusion: rumours of death greatly exaggerated.
Java may or may not be in decline – If it is I can't say I've noticed – but I think it will be quite some time before Java web frameworks cease to be relevant.
What do you think about Grails? I've been very impressed with it. It offers a lot of the same productivity and elegance that Rails does - but it allows you to re-use all your Java knowledge.
> On the other hand, the time for Java web frameworks is > clearly on the decline. It is hard to imagine using Java > for a large web project in 2007 unless the project is > using OtherPeople'sMoney.
Yup, OtherPeople's Money is what pays salaries. And Java for web projects is quite well and alive for 2007 and beyond, when you need to use proven technologies and reuse or integrate with existing code and in-house expertise.
> > Ruby on Rails is widely seen as five to ten times as > productive as Java for developing web apps. Native Ruby > 1.8 is slow, though for many web applications scalability > is more important than speed. With Sun now supporting > JRuby the obvious platform for a bleeding edge green field > web project today is JRuby/Rails.
You obviously have too much trust or not enough experience with Sun's software track record ....
> On the other hand, the time for Java web frameworks is > clearly on the decline. It is hard to imagine using Java > for a large web project in 2007 unless the project is > using OtherPeople'sMoney. > As a lot of people have pointed out: java is for today's yunguns what COBOL was for their grandpappies. None will admit it, of course. They're accreting codebases in just the same way; using the same data technology (the last part they don't even see). It makes me smile.
> I have mixed feelings about the presentation. I think Matt > does an excellent job of comparing the frameworks and he > really "gets it" about JSF. > > On the other hand, the time for Java web frameworks is > clearly on the decline. It is hard to imagine using Java > for a large web project in 2007 unless the project is > using OtherPeople'sMoney. > > Ruby on Rails is widely seen as five to ten times as > productive as Java for developing web apps. Native Ruby > 1.8 is slow, though for many web applications scalability > is more important than speed. With Sun now supporting > JRuby the obvious platform for a bleeding edge green field > web project today is JRuby/Rails. I am a big fan of Java > but I can't imagine signing onto a Java web project in > 2007. It just seems so clunky and unnecessarily complex.
Ruby on Rails is not more productive in all areas. Getting an initial production quality environment up for ROR is not easy. You have to mess with FastCGI, lighttpd and so on. With Java you just install Tomcat and you are done. Nothing could be simple. WAR file is very easy to make.
Secondly, I don't like code generation. I think any time code is generated something is lacking in the engineering department, some kind of flaw is being covered up. You could say it's just a quickstart app, but if that's all it is, then all kinds of frameworks have quickstart apps. Nothing stops anyone from writing a quickstart app that provides good generic templates for CRUD.
I agree that Java itself, as a language, is far from ideal. However, there are other considerations to keep in mind. For example, every library you can imagine exists for Java. And they are mature and ready to use. On the other hand, last time I looked Oracle driver for Ruby was version 0.2.x or something ridiculous like that. And it's not just that. Many Ruby libraries are version 0.x or 0.0.x and/or are abandoned. So a community is a biggie. If the language cannot have its own community, it should at least piggy-back on a thriving community. JRuby is good from that point of view, but JRuby is a follower of Ruby and is not a leader. Since JRuby doesn't have its own identity, it's not something I would strongly support.
The best dynamic language community seems to be Python to me. But Python, as a language, appears to be lacking in many areas to me.
So, there is no clear winner right now. It seems like either you get a good language and no libraries, or you get a great community and libraries with a mediocre language. You cannot have it all. If Haskell had the same quality of libraries as Java, maybe everyone would long ago have moved to it.
Since from a theoretical compilation advances point of view JIT seem to be the future, it seems to me that languages like Scala, Groovy and Clojure are the way forward. The reason I say this, is that JVM is the most mature GPL'ed JIT with the biggest array of libraries.
> I don't think it's right to compare potatos with > pineaples.
It depends on the situation. If you just want to eat, then it is perfectly OK to compare potatoes with pineapples. On the other hand, if you specifically want a fruit, or if you specifically don't want a vegetable, then it's not OK to compare them.
You cannot reasonably make any absolute statement about comparing things. But don't take my word for it.
> On the other hand, the time for Java web frameworks is > clearly on the decline. It is hard to imagine using Java > for a large web project in 2007
What do you base that on? Java certainly has it's shortcomings (and Ruby has it's own) but on the decline, I don't think so.
> Ruby on Rails is widely seen as five to ten times as > productive as Java for developing web apps.
I guess that depends on who you're talking too. I've heard plenty of people who did one decent sized project with RoR, got into a mess maintaining and scaling it, and went back to Java for new projects.
Personally, I find Scala much more interesting, and Lift is growing to be a framework where the authors looked close at RoR (the main author actually used RoR in anger for 1 or 2 years), made notes of the nice parts of RoR, and ditched the bad ones (like that horrible templating RoR advocates).
> Native Ruby > 1.8 is slow, though for many web applications scalability > is more important than speed. With Sun now supporting > JRuby the obvious platform for a bleeding edge green field > web project today is JRuby/Rails. I am a big fan of Java > but I can't imagine signing onto a Java web project in > 2007. It just seems so clunky and unnecessarily complex.
It is great that JRuby is being pushed as a viable JVM language. Do take a look at Scala though.
> It depends on the situation. If you just want to eat, > then it is perfectly OK to compare potatoes with > pineapples. On the other hand, if you specifically want a > fruit, or if you specifically don't want a vegetable, then > it's not OK to compare them.
I agree with you.
Depending of our problem, we will have different perspectives.
What I wanted to say is that maybe the post would look nicer with a more appropriate title; because the definition of the word 'compare' says:
Maybe the right word is not "like", because like is something that you enjoy, and something that is done there is mixing things. And that is something I do not like.
If you want to use the language with the biggest mind-share, then you should use Java with a popular (but sucky) Java web framework.
If you are unconcerned with your ability to find lots of programmers experienced in your toolset and want to use the most flexible and productive programming environment, then you should use Java with Wicket.