I haven’t sat down in a long time and actually tried to determine a trend in the Java web framework arena. The uncountable number of “easy to use” Java web frameworks that are out now adays is too many to even start to pay attention to.
Struts 1 came out at a perfect time in history… where your only choice was either hand-coding everything or Struts… and most people went with Struts.
Flash forward a few years later and now you are in a state where everyone has done, redone and re-redone Struts and the Model 2 style of web frameworks over and over and over, each one supposedly easier and faster than the previous one.
Some of the frameworks genuinely bring some pretty cool ideas to the table in new and interesting ways. Others of them accomplish basic tasks with the most convoluted/confusion syntax ever; requiring you to readjust your thinking that you’ve already spent years learning (sorta like Windows Vista did) and learn entirely new technology stacks from the ground up.
With so many choices for Java web frameworks out there, and most of them pretty decent from a technical level, the only thing causing the adoption of particular ones to grow are tools and tooling support.
Unfortunately, not a lot of the teams working on these frameworks understand/believe that or don’t want to work on tools (understandably, it can be a lot different doing tools than it can be doing a framework).
That being said, what if you are a pretty accomplished developer, and don’t need tools? Which Java web framework is the one for you to choose? Well, that’s what I want to try and figure out…
I’m only going to consider frameworks that I’ve seen significant growth and news around for the last few years… I apologize if I’ve excluded your favorite framework here; if it’s big enough let me know and I’ll add it.
I also tried to include only next-gen frameworks… so no Struts or WebWork in this list. The Java web frameworks I narrowed down to are (in no particular order):
- JavaServer Faces: It’s part of the spec, have to consider it.
- Apache Wicket: Big grassroots effort, personal favorite and strong team.
- JBoss Seam: Lots of folks using it and saying it’s pretty great solution to JSF development.
- Spring MVC & WebFlow: I’m clumping them together because I don’t think either have significant penetration on their own to justify separate categories.
- Struts 2: Struts was too big not to include this.
And lastly, I wanted to take a look (out of curiosity) at the following non-Java web frameworks:
NOTE: I used Google Trends to determine a universal interest/penetration level for the individual technologies. Alternative names for some technologies were combined to create the single value (e.g. ‘JSF’ and ‘JavaServer Faces’ and ‘Java Server Faces’) in hopes of creating the most accurate values.
I also want to clarify that Google Trends information is based on frequency of search terms (not the number of pages indexed with the terms specified). So if you trend “Cat” against “Dog” you are trending the frequency of times people are searching with the term “Cat” vs “Dog”.
This is actually an interesting data point, because I think most people search for terms when they are evaluating or learning a technology stack… not just for fun. So by trending the keyword search frequency, we are getting a live “vibe” of how active the community around these technologies are in a round-about way. Or at least a decent approximation determined by the interest of the greater development community.
I used the following values in the Google Trends engine to represent each framework:
- JavaServer Faces: (javaserver faces) | (java server faces) | jsf
- Apache Wicket: (apache wicket) | wicket
- JBoss Seam: (jboss seam) – Cannot use the term ‘seam’ it’s too common
- Spring MVC & WebFlow: (spring mvc) | (spring webflow) | (spring web flow)
- Struts 2: (struts 2) | (struts2)
And for the non-Java frameworks:
- Adobe Flex: (adobe flex) | (adobe air) | (flex 2) | (flex 3)
- Ruby on Rails: (ruby on rails) | “RoR” | ruby rails
I’ve tried to include most all of the different name variations when representing the technology stacks and exclude potential false positives to give as accurate results as possible; especially with the frameworks that included normal-ish words in their names (e.g. Seam and Flex).
If you have any enhancements that you think might make the results more accurate, please let me know.
NOTE: Even with the liberal use of qualifiers I realize there is still a margin of error created for more common words that can possibly match for a term. So please do your own research and come to your own conclusions when researching frameworks for use at work.
Now let’s start analyzing these. When you drop all 4 of the Java web frameworks onto a trend diagram, you end up with what I found to be a pretty surprising result, JSF is the clear winner with a surprising amount of Struts 2 mixed in there:
If we take JSF out of the picture so we can get a better idea of how the runners up stack up against each other, we get:
Which is much more interesting I think is how Wicket adoption has stayed almost flat while Struts 2 adoption has spiked. Spring MVC/WebFlow seems to be going no where fast and racing JBoss Seam there.
The popularity of Struts 2 really caught me off guard with it being quite a bit different from Struts 1, I figured it got thrown into the “just another web framework” category, but I guess there is something in a name and it’s doing quite well.
Because of this trend I’d expect to see some Struts 2 tooling support start gracing some IDEs here in 2009.
Now let’s switch gears and take a look at our non-Java web frameworks and see how those two are doing:
Again, very interesting. If I had to guess based on the buzz I hear, I would have guessed that Ruby on Rails would be destroying Adobe Flex, but as we see here Flex is really carving out a nitch for itself among developers.
I had a chance to speak to a predominately Spring-shop recently who had adopted Flex and their reason for doing so was:
- low barrier to entry to get something up and off the ground working
- easy to make a nice-looking UI that worked quickly and reasonably functional
- focused tooling support
The fragmentation in the Java web framework space is certainly one of the biggest causes of the lack of great tooling for 1 particular framework over another. As soon as you support framework A, users scream for B support, and next thing you know you are trying to maintain tooling support for 6 frameworks across every single release (speaking from experience)… it’s expensive and a huge nightmare. Having the focused language and platform that you can target your tools directly at is really nice… then again your trade off is a locked-in platform, sort of like the Visual Studio/Microsoft story all over again… but that’s neither here nor there if your company has the money and has problems the technology solves well.
Getting back to our trend analysis, let’s take the top 2 Java web frameworks we have and super-impose them on our 2 non-Java frameworks and see how they do:
Again, very interesting. I expected the gap between JSF, Ruby on Rails and Flex to be bigger… I’m not sure what I expected it to look like, just that it would be bigger. Remember that JSF was the far-dominate Java web framework by a factor of atleast 2x, and now super-imposed ontop of Ruby on Rails and Adobe Flex it is looking like a very close game, with Struts 2 (our 2nd highest Java contender) dragging below them all.
If we simplify the trend by removing Struts 2, we get:
Not too big of a difference, the three web frameworks look like they are in a pretty good race and may continue that way for a time to come.
An interesting way to predict how the future will look is to look at the history of the technologies, more specifically:
- JSF hasn’t been able to boost it’s numbers by much at all over the last 4 years. There was a slight increase in 2004, even less in 2005 and then it just flattened out and decreased in ’07/’08.
- Ruby on Rails blew up in 2005 and 2006 and is settling a bit it looks like.
- Adobe Flex didn’t blow up but has had a pretty steady rise after a very slow start in 2007 and 2008.
I wonder if Adobe Flex is going to be the next vendor to lock-into in the classic Microsoft model?
Actually, that’s an interesting question, where does .NET fit into all of this? Let’s have a look:
NOTE: I only used ‘asp.net’ to represent .NET to have a more focused trend. Using ‘.net’ almost completely flattens out the competition technologies and there is no guarantee that I wouldn’t also be capturing a ton of client-side development using .NET as well.
Oh wow… now it’s just embarrassing… the issue isn’t even if Wicket is better than JSF, or if Spring WebFlow will trump Struts 2… it’s a much, much more general question of: Is Java web development providing solutions to developers?
Given the incredible dominance of .NET and the growing rise of Adobe Flex, I have to imagine that, as developers, while we might squabble about the differences and benefits of framework X versus framework Y, these commercial, proprietary, complete-stack solutions from Microsoft and Adobe are being used to actually solve problems at companies.
Sort of puts the framework-wars on JavaLobby into perspective when you realize you might be fighting for 2% of a dirt-pie, while the guys outside are all sitting down to a lobster dinner.
Update #1: The trend graphics were updated to link directly to Google Trends with the appropriate searches. Thanks Brian Fernandes!
Update #2: Some user pointed out it might be interesting to add back trends for JSP/Servlets and Struts to see how they stack up. I tried doing this with Struts by using the trend value “struts-2″ to get just Struts results and not mix them with Struts 2, and what I got was a value that was on-par with the other Java technology stacks, not even breaking into the ASP.NET realm. It’s also really hard to try and get an accurate read with JSP/Servlets as using either of those terms is going to pickup any search of “jsp editor” or “jsp autocomplete” or any other question that isn’t really related to deploying apps using the tech but just questions about editing a specific J2EE artifact.