What's the best way to compare JVM Web Frameworks?
I've been comparing web frameworks ever since 2004. It was the first time I'd ever proposed a talk for a conference. ApacheCon was in Vegas that year and my buddy Bruce suggested I speak at it. I submitted the talk, got accepted and went to work learning the frameworks I was talking about. At the time, I had a lot of Struts experience and I'd made a good living learning it, consulting on it and blogging about it. However, there was a new kid on the block (Spring MVC) that was garnishing attention and some other frameworks (WebWork and Tapestry) that had a lot of high praise from developers. I was inspired to learn why so many people hated Struts.
Fast forward 8 years and I'm still comparing web frameworks. Why? Because there still seems to be a large audience that's interested in the topic. Witness InfoQ's Top 20 JVM Web Frameworks, which was one of their most-read articles for two months in a row. One of the beauties of the Java Community is that it's very diverse. There's tons of folks that are part of this community and, like it or not, several folks that are former Java Developers. However, these developers still seem to maintain an interest in the community and it's still one of the largest pools of talent out there. Java is still quite viable and only seems to be getting better with age.
So the topic of web frameworks on the JVM is still hot, and I still like to write about it. For those of you still enthusiastic about the topic, you're in luck. The two best websites for the Java Community, InfoQ and DZone (formerly Javalobby) are still very interested in the topic too!
Both sites emailed me in November to get my advice for their research on the subject. InfoQ (specifically Dio Synodinos) was mostly interested in 1) having me analyze their recently-gathered data, or 2) helping them create a new version. DZone (specifically Mitch Pronschinske) emailed about doing a similar survey to InfoQ's, but with more relevant data points (include GWT, specifying Struts 2 vs. Struts 1, etc.).
My response to Mitch at DZone:
Interestingly enough, the folks at InfoQ contacted me as well as they're thinking of doing a new survey. One of the things I mentioned to them is it'd be interesting to see what folks are using AND which frameworks they admire. Often, devs don't get to choose their web framework at work. I wonder if it'd be possible to collaborate with InfoQ to gather data from developers so it's not being done on two different sites?
I submitted a talk for ApacheCon NA (in February) called Comparing Apache Web Frameworks. When choosing Web Frameworks, I've often found it helps to eliminate frameworks and narrow the scope. Obviously, this makes sense for an Apache Conference, but not for all developers. However, I do plan on analyzing each framework based on a limited set of criteria. Here's what I have so far:
Community, HTML5, REST, Mobile, Performance, Web Performance Optimization
Obviously, community is important for Apache projects, but might not be for the wider audience. It might be good to limit to these 5 criteria, or expand it to 10, but not more. I think it'd be interesting to get the community to rank the various frameworks on these criteria, and also try to find developer's biases while doing it. For example, I wonder if people would be willing to admit they're biased for/against certain frameworks and then take that into account as part of gathering the data?
Unfortunately, ApacheCon denied my submission. This make sense since their schedule seems to be concentrating on HTTPD, Cloud and Big Data.
For InfoQ, Dio asked for a list of web frameworks to include. Below is a list we started with, followed by my response.
- Spring MVC
- Play
- Grails
- JSF
- Struts 2
- Wicket
- Lift
- Tapestry 5
- Seam
- JRuby on Rails
- Wicket
- GWT
- Vaadin
I would add Stripes, vert.x and maybe something like Apache Click. VRaptor is probably a good one to add too. There's always a few less-used frameworks that get a lot of complainers if you don't include them.
Comparing to your previous list, I don't think Seam should be in here since they've split the project into separate bundles and are no longer developing Seam as a whole. JRuby on Rails is a tough one because if you say Ruby on Rails, you'll get a ton of responses, but probably not from the Java community. The Ruby community might chime it quite a bit if you can get in touch with them though.
I believe you should include Clojure web frameworks, but I've only heard of one of them: Compojure.
SiteMesh, Netty, etc. - remove them.
I also offered my advice on instructions:
I actually like the two coordinates you used before, importance and adoptability. However, I don't know that everyone read the instructions this way. Most people didn't rank all frameworks and I believe that's part of the point. I only ranked the ones I'd used, but I think it'd be better if people ranked all of them. I also think having these two criteria opens it up to more than just developers. Project/Product Managers and stakeholders that've been successful with certain frameworks should be able to vote too.
For DZone, they wanted to include a set of criteria for ranking:
- Project maturity, community support, and documentation quality (one criteria)
- UI Features Capability (maybe some are more graphics driven or form driven?)
- Code readability
- Flexibility (maybe this could be broken down into what types of projects the framework can handle) or several criteria that ask if it is "Good for 'x' type of project"
- Performance/Speed
- Cross platform support
- Extensibility, Plugins, Community Libraries
- Architecture (this may just be information for later, not an opinion question)
- Web standards support
- REST support (is this something you would just rate a yes or no? In that case it wouldn't need to be an opinion question)
- Mobile support
My response:
For web frameworks, I believe the 5 I mentioned (Community, HTML5, REST, Mobile, Performance, Web Performance Optimization) are most important, with Security become more and more of a concern. For web standards support, I'd almost change it to "HTML5" and to see how the various frameworks stack up. I think REST is very important, and I think it's cool that Struts 2, Spring MVC and Grails all have great support for it. It'd be interesting to see how the component-based frameworks think of having REST support in the framework (vs. external like Jersey, CXF, etc.).
Of the list you provided, I don't know about Code readability or Flexibility. Code readability is kinda like Learnability. One of the nice things about Spring MVC and Grails is that you can learn how they work very quickly. Then you can use that knowledge and don't have to look things up much. Tapestry and Wicket might be similar for those writing large apps, but I haven't found that to be as true. The more traditional MVC Frameworks just make more sense to me.
UI Feature Capability is a good one because frameworks with widgets are often popular with developers. Flex, GWT, jQuery UI, Sencha all do this very well.
Summary
The reason for this post is to add some transparency to the process of Comparing JVM Web Frameworks. I like to think that I've tried to do this in the past (especially with my reasons for rankings). Now, we'd like to hear from you, the community that uses these web frameworks.
What's the best way to compare JVM Web Frameworks?
While it's nice to hear from the generous folks that create and maintain JVM Web Frameworks, we're mostly interested in hearing from the developers that are using these things on a day-to-day basis. The Blue Collar Developers, if you will. If you could design a JVM Web Framework comparison that answered your questions, how would it look? What questions would it ask? What conclusions would make you happy? Should commercial frameworks like ZK be included?
Your responses are very greatly appreciated.
Hi Matt,
To start: a good approach on providing some transparency, but I have some doubts on how effective it is to compare these webframeworks. While Rails vs Grails vs Play might be a very straightforward comparison, Grails vs Wicket is not.
Providing criteria, like development speed, support, documentation, new releases, etc, might be generally applicable to most listed frameworks (though I think it's a bit unfair to list Wicket twice ;)), what would an outcome, whatever outcome, like that mean? Aren't you comparing Apples to Pears?
So wouldn't it be a better idea to split the frameworks a bit, eg into UI frameworks and more 'full blown' (DI, UI, Persistence, etc) framework?
I also wouldn't mind seeing a Javascript framework added to the list though, or a (semi) commercial one like GXT.
Good luck!
Erik
Posted by Erik Pragt on January 09, 2013 at 04:12 PM MST #
So wouldn't it be a better idea to split the frameworks a bit, eg into UI frameworks and more 'full blown' (DI, UI, Persistence, etc) framework?
This is a great point. Full-stack frameworks like Grails and Play are great, but usually only for greenfield projects. And how many greenfield projects do developers really do? Not many.
I think most companies use (and love) Spring MVC because it's an easy migration from Struts 1 and they don't have to change their backend.
IMO, developers love greenfield projects moreso than maintenance or migration projects. Hence the passion you see for full-stack frameworks.
Posted by Matt Raible on January 10, 2013 at 05:38 PM MST #
Disclaimer: I work for Oracle, but not on JSF and have developed myriad Java web applications with myriad frameworks as an independent before I joined Oracle. I happen to be a fan of Java EE, JSF and JAX-RS. I don't think that's any different from Matt's self-confessed bias against JSF and component based frameworks.
Feedback:
P.S.: The site's color scheme is truly dubious, please improve it :-).
Posted by Reza Rahman on January 12, 2013 at 01:28 AM MST #
It seamlessly combines Java and JavaScript.
Posted by Mario Claerhout on January 14, 2013 at 06:02 AM MST #
Hi Matt,
I second the ZK-framework. It should be one of the candidates in the comparison list for its community, adoption, the amount of out of box widgets it has...
Posted by Zenil on January 22, 2013 at 10:24 PM MST #
Vote for ZK.
Btw. - the licence:
ZK CE LGPL (free for open source and proprietary use)
Posted by Jiri Bubnik on February 11, 2013 at 03:26 PM MST #