OSCON 2007: Comparing Java Web Frameworks
This afternoon I delivered my Comparing Java Web Frameworks talk at OSCON in Portland. I told attendees I'd post it here afterwards, so here it is:
Download Comparing Java Web Frameworks Presentation (5.1 MB)For comments on this presentation from earlier this year, see related postings from ApacheCon EU and JA-SIG. This presentation is pretty much the same as the one from ApacheCon and JA-SIG, except it has a different theme and I chopped out the Sweetspots section (due to time constraints).
Portland is great this time of year, but unfortunately I won't be sticking around. I'm heading down to Salem to work remotely for a couple of days, returning for the Oregon Brewers Festival on Friday and heading back to Denver on Saturday. I'll be glad when July is over - I've traveled to a new state every week.
Posted by Ned on July 26, 2007 at 12:52 AM MDT #
I'd like to try to make a couple of points of constructive criticism. I'll declare here that I'm a big fan of stripes and so this will be somewhat one-sided, but I will attempt to remain balanced. I also realise that out of the frameworks included, you have the least experience in stripes and so some omissions are to be expected.
cheers,
dim
ps - if my children ever do that to my TV I think I'll cry!
Posted by Dmitri Colebatch on July 26, 2007 at 01:43 AM MDT #
To evaluate a framework, there is another important criterion, that is accessibility, since many countries have enforced their law on this subject. Many frameworks offer now "cool stuff" like ajax support and other javascript libs, but do they propose workarounds without JS ?
Btw, I love slide 17 in your presentation ! I'm happy it's not my living room !!!
Posted by Tristan Marly on July 26, 2007 at 07:19 AM MDT #
Posted by Gwyn Evans on July 26, 2007 at 01:51 PM MDT #
> So... which one would you use?
It depends on the application I'm building. If it's for a high-traffic, consumer-facing site that needs to be stateless, I think it makes sense to use something like Spring MVC, Struts 2 or Stripes. I like the programming model behind Stripes and Struts 2 moreso than Spring MVC. I haven't had any issues with Struts 2 like you have, but I agree that changing the FreeMarker themes aren't as clean as I'd like. When I set the default theme to "simple", I expect no HTML to be randomly inserted. Stripes is good, but it's a tough sell to companies when the community is so much smaller than the rest of the frameworks. Also, while its user community is strong and passionate, it doesn't seem like their developer community is that strong. The whole "lead developer gets hit by a bus" syndrome.
If it's not Struts 2 or Stripes, I really like Wicket. I also believe that Tapestry 5 will be a strong contender. However, with Tapestry's current project instability (why start with 4 when there's no upgrade path? why start with 5 when there's little documentation and only preview releases?) - it seems foolish to recommend it to companies. Especially when they're building their 5-10 year future platform on a framework.
Dmitri - Stripes does a lot better when you're choosing a framework for developers. However, you often have to choose a framework both for developers and for a company. Will Stripes be around in 5 years? Probably, but there's no books about it and it's often unheard of on developer's resume. Both you and I know a competent developer can learn most of it in a day, but companies like to see it on resumes. As far as hard-coding URLs in action beans - I say the same thing as you do in my talk. For decoration, it's interesting to see that Stripes has a layout feature. However, looking at that page - it looks like Tim admits it's primitive and recommends SiteMesh. The two mailing list traffic slides are both "user" list traffic - the 2nd one is to show that GWT is the new leader in Java Web Framework Mailing List Traffic. Does that mean anything? Who knows - but it makes for a pretty graph in a presentation. ;-) The Wicket Guys used to say that mailing list traffic meant nothing, but now that they're neck-in-neck with Struts, I doubt they have the same opinion.
Tristan - I absolutely agree with you. AFAIK, Struts 2 and JSF's Ajax support are all-or-nothing. If JavaScript is on, they work. If it's off, they don't work. I've heard from Tapestry's Jesse K. that Tapestry's Ajax support is not all-or-nothing and everything continues to work when JavaScript is off. Most organizations with sites that define their business use "progressive enhancement" for Ajax stuff. Java developers create Web 1.0-style applications, web developers use Ajax to modify the page and Ajaxify them. Frameworks that make this difficult are not good IMO.
Gwyn - on my current project, we removed Wicket as a candidate for two reasons: 1) no conditionals in templates and 2) stateful by default. I know it's possible to make Wicket stateless, but when developing a high-traffic site, it seems logical to *not* choose a component-based framework. Also, Wicket's EL in templates is very limited and doesn't allow calling methods with parameters, nor doing conditional logic. While you may say there's workarounds for this, this was a deal-breaker from the web developers' perspectives. As far as HTML templates live next to Java code, I'm aware this is only the default and it's changeable. I say this in my talk. However, it's not web developer-friendly out-of-the-box, so that says something to me.
Thanks for the great comments everyone!
Posted by Matt Raible on July 26, 2007 at 03:00 PM MDT #
I wrote a plugin for Stripes integration into IntelliJ IDEA (Selena version) IntelliStripes. Is in beta stage, but is usable right now. I hope add some extra functionalities in the next weeks
Thanks for your comments and suggestionsPosted by Mario Arias on July 29, 2007 at 11:32 PM MDT #
What about ZK? It often listed as the most active project on sourceforge, but it's rarely mentioned in these "java web frameworks compared" blog articels you see around the place.
How can it be both popular, and not mentioned in the Java blogosphere?
David
Posted by David Roussel on August 09, 2007 at 05:11 PM MDT #
Posted by Matt Raible on August 09, 2007 at 05:21 PM MDT #
Posted by David Roussel on August 10, 2007 at 03:40 PM MDT #