RE: What Web Application framework should you use?
Tim O'Brien has an interesting post titled What Web Application framework should you use?. The first thing I noticed about this post is the permalink. It looks like he started with "Isn't Rails supposed to change...", which makes me wonder what the rest of the title was. In this post, he rags on Java Web Frameworks and the lack of a clear path for choosing one. He ends up predicting that many will stick with Struts 1.x (poor bastards) and those that aren't tied to Java should move to Rails. I don't have a problem with folks moving to Rails, but I would like to comment on the Java Web Framework space and Tim's comments.
Prediction: The confusion over what is happening over at Struts is going to discourage people from continuing to use it. The Struts team did the right thing in recognizing that Struts 1.x was a dead-end, but that project needs a single public message. Is it Struts Action or is it Struts Faces? Or is it two frameworks capitalizing on the Struts brand name?
I think what is going on in the Struts project is definitely two frameworks capitalizing on a brand name. That was a concious choice on the project's part when they chose to start creating sub-projects. The interesting thing about Struts Shale is it's largely a prototype for JSF 2.0. Furthermore, it was rejected by many Struts developers as becoming Struts 2.0. Why? Because JSF sucks. Especially when used with JSP - which is what most folks are doing.
JSF continues to be the most over-hyped under-used framework in Javaland. If you read the blogs of first-time users, you'll find many complaints and issues on how things work. Granted, most of these problems are with JSP and the implementation, but still. If I were in charge of JSF, I'd dump JSP altogether, bundle Facelets with it and allow more flexible page navigation (including controller-to-page). Don't get me wrong, I like the ideas behind JSF, I just don't like the implementation (or the fact I have to wait years for things to be fixed in the spec).
That being said, I've yet to meet an unhappy WebWork fan. If you find someone that still likes Struts, ask them if they've used WebWork. Chances are they'll say no. As far as Tapestry is concerned, the learning curve is too high. It's been rejected time and time again by my clients because of the learning curve. Are they going to fix this? Yep, they're going to re-write the whole damn thing - again! Every major point release of Tapestry throws backwards-compatibility out the window. Furthermore, I've heard once you get over the learning curve, it's a joy to work with. I've also met people at conferences that've used it over a year and say they're still struggling with its concepts.
Spring MVC - I wish I had bad things to say about it, but I don't. It (obviously) has the best Spring integration, but I've found WebWork much more pleasurable to work with. Sure, Spring has a ThrowawayController, but with a name like that, you can tell it's a second-class citizen.
Inspired by Tim's post, here's my prediction:
Struts Action 2 will be the best choice for developing Java-based web frameworks. Not only does it support JSF, but it's easy to learn, test and use. Furthermore, it seems to be the most often used framework in major software products and web sites.
How's that for a clear message? Struts Action 2 is the shiznit, now let's get back to developing applications.
Disclaimer: This is my opinion with a lot of stuff thrown in to get folks riled up. I've never put a JSF, Tapestry or Spring MVC application into production (except for AppFuse of course), so most of my opinions are likely without foundation. In wonder how many applications Mr. O'Brien has put into production with these frameworks?
JSF has some great ideas. Hightower's piece really frames the concepts well, but as soon as you start trying to put JSF into practice you either end up in the tar pit that is Sun's Java Studio Creator or in MyFaces, which is usable but still has a steep learning curve.
Shale to me seemed like a premature distraction from Struts 1.x - I really did seem like Craig started work on Shale almost in a vacuum.
But, it's funny, mention Rails anywhere and you get some really riled up Java developers. :-)
Posted by Tim O'Brien on June 20, 2006 at 08:59 AM MDT #
One small question though. Webwork2 is basically dead as the team has moved onto the Struts Action project. Does it not worry you that WW2 won't evolve anymore and migration path to Struts Action is probably non-existent?
Posted by Wayland Chan on June 20, 2006 at 09:13 AM MDT #
But Wicket has surpassed every Java component framework I've tried. So much cleaner than Tapestry with a definate OO feel to it. It's very similar to Swing programming, which in my mind is a good thing.
It's a shame you don't drop Tapestry and incorporate Wicket into AppFuse. Tapestry may be the "leading" component framework right now, but I have yet to see a newcommer just "pick up" Tapestry without a whole lot of training. This kindof defeats the whole appfuse purpose of getting up and going as quickly as possible. Wicket seriously took me ten minutes before I was completely productive, and I haven't turned back since.
Posted by Ryan Sonnek on June 20, 2006 at 09:23 AM MDT #
No, this doesn't worry me at all. WW2 is Struts Action 2, so it will continue to evolve. With developers like Don, Ted, Patrick and Crazy Bob - I'm not at all worried about this project's ability to improve.
As far as a migration path, it should be as simple as changing a few filenames and package names. I plan to start replacing AppFuse's WebWork version with SA2 in the next few weeks. Then I'll start showing others how to do it.
Posted by Matt Raible on June 20, 2006 at 09:29 AM MDT #
My problem with the whole Java framework discussion is that JSF is now the official specification for J2EE Web frameworks. This seems wrong, since we are seeing that there a number of good approaches to writing a component based framework. It also creates a FUD scenario where teams select JSF, because it is the "standard" and will have better "vendor support".
The other problem, IMO, is that an action based framework is the more appropriate choice for many applications. I would also go as far to argue that an action based framework should be used if the team contains multiple beginner level developers, while component based frameworks are better left to very experienced development teams. A good direction for this discussion to go would be to talk about the distinction between action and component based frameworks and the advantages to using one over the other.
I think it will be interesting to see if Ruby has these kind of issues in a year or so and how the Ruby development community deals with them.
Posted by Rob Breidecker on June 20, 2006 at 10:49 AM MDT #
I absolutely agree with this. The funny thing about JSF vs. Tapestry vs. WebWork (or XXX web framework) is you're likely to hire the same hot shots to help you implement an application with it. Who are these "hot shots"? Independent consultants who have experience putting a real application into production using the technology.
You're not going to hire Oracle, IBM or Sun (or JBoss for that matter) to help you learn and use JSF - you're going to hire somebody that's done it. So from a hiring perspective, there's lot of JSF positions, but I doubt there's a lot of truly experienced developers out there. Except for Hightower of course, but I think he likes banging his head against the wall. ;-)
Posted by Matt Raible on June 20, 2006 at 11:01 AM MDT #
Posted by Jason Carreira on June 20, 2006 at 11:05 AM MDT #
Posted by Dan Hinojosa on June 20, 2006 at 11:59 AM MDT #
Posted by John Christopher on June 20, 2006 at 12:21 PM MDT #
If I were in charge of JSF, I would have built it as JSP 2.0 from the beginning. Seems that JSP & JSF will finally unite in JSP 2.1 spec, though the spec still tries to kick JSP out of the nest by limiting EL features for pure JSP pages.
If you are/were Windows developer, the example is right here: real-mode Win16 -> protected-mode Win16 -> Win16 + Win32s -> Win32 + DOS7 extensions -> pure Win32 -> Win32 + .Net -> ...
A developer of a Windows app can still build a Win16 app, deploy it on WinXP and it will work. _This_ is an example how to ensure API compatibility, how to keep users while improving and extending the API. JSF did not go this path initially. Well, I guess Craig M was not 100% sure that JSF would be accepted as default J2EE view technology when he started developing JSF...
> I like the ideas behind JSF, I just don't like the implementation
The ideas behind JSF are collectivelly known as ASP.NET
> Because JSF sucks.
Is it actually your opinion, or you just quoting a link? ;-)
> Struts Action 2 will be the best choice for developing
> Java-based web frameworks. Not only does it support JSF,
> but it's easy to learn, test and use.
> I would also go as far to argue that an action based framework
> should be used if the team contains multiple beginner level
> developers, while component based frameworks are better left
> to very experienced development teams.
I would argue exactly the opposite, especially if there are easy-to-use GUI tools and the build process is simple.
Posted by Michael Jouravlev on June 20, 2006 at 03:05 PM MDT #
Posted by Sam on June 20, 2006 at 03:23 PM MDT #
Posted by Michael Jouravlev on June 20, 2006 at 03:42 PM MDT #
Posted by Ricardo on June 20, 2006 at 06:29 PM MDT #
Posted by Serge Dubov on June 20, 2006 at 06:32 PM MDT #
We found http://click.sourceforge.net/
Click passes our 10-minutes test. A new developer, student, able to use the framework within 10-minutes of reading http://click.sourceforge.net/
Why we like it:
Worth looking at a different and simpler J2EE web application framework
Posted by J.F. Zarama on June 20, 2006 at 07:31 PM MDT #
Posted by Ben on June 20, 2006 at 09:16 PM MDT #
Posted by Wayland Chan on June 20, 2006 at 10:32 PM MDT #
So I ate the JSF burritto and I don't see what everybody's problem with JSF is? It's a lot of work to understand it but that's because it's trying to do a lot more. I would recommend "Java Server Faces In Action" if you really want to "get it" and read the whole thing otherwise you'll fight the way JSF wants you to do things and have a hard time.
My biggest problem with JSF right now is that although it is good for web applications (where one logs in and manipulates and creates data), it is still not a great fit for Web Sites (where there is a lot of casual browsing going on) mostly because of the POST only nature and complex maintenance of the user's current view state. This makes it difficult to do view level caching, search engine optimization, have permalinks and otherwise deal with random navigation. I am trying to figure out a good web framework for this task and I want something less primitive than struts. Maybe I'll try the Spring Framework as it seems to be the lesser of the evils right now.
Posted by Justin on June 21, 2006 at 12:02 AM MDT #
I did not see stripes mentionned in this thread (it is mentionned in the original post from Tim and in the comments over there). You should check it out: it is tight, clean, well documented, and easy to learn.
The zero-configuration programming model is a joy, and should you try it, I bet you will enjoy a lot of these "wow, this is too easy!" moments. I still do, which is a testament to how good Stripes is and how "ancient" (i.e. "crippled") Struts is.
imho, it beats all the other contenders in the pure mvc space: struts, webwork2 ("I coulda been a contender" but missed the opportunity, harder to learn and use), spring mvc ("with great power comes...lots of XML!"), tapestry (too alien, to steep learning curve).
The others are pale imitators (strecks, vraptor) or not radical enough. I looked at Click's documentation and I did not experience the "wow!" feeling I had when I looked at Stripes' the first time.
When it comes to Struts2, well...Who understands the story there? I certainly don't: is it going to be Shale, Struts 2, Struts Action, WebStruts or StrutsWork ? ;-)
As for JSF, it is not worth the effort until 1.2 and facelets come out and fix it (hopefully...). As it stands now, you need to bring in Seam to make it productive - not exactly lightweight...
I urge everyone to take a good look at Stripes
Posted by Renaud Bruyeron on June 21, 2006 at 01:14 AM MDT #
Another WebWork/SAF developer (that didn't make it to the list ;-),
.w( the_mindstorm )p.
Posted by Alex Popescu on June 21, 2006 at 09:01 AM MDT #
Posted by Ben Gunter on June 21, 2006 at 09:16 AM MDT #
Posted by Nic Holbrook on June 21, 2006 at 09:49 AM MDT #
Posted by Brychta on June 21, 2006 at 12:00 PM MDT #
Posted by Jesse Kuhnert on June 21, 2006 at 05:23 PM MDT #
Posted by Ray Tsang on June 21, 2006 at 07:22 PM MDT #
Posted by Rob Fletcher on June 22, 2006 at 02:27 AM MDT #
Posted by Graeme Rocher on June 22, 2006 at 09:56 AM MDT #
Posted by Erik's... Hmm... on June 22, 2006 at 01:32 PM MDT #
.w( the_mindstorm )p.
Posted by Alexandru Popescu on June 23, 2006 at 04:38 AM MDT #
Posted by j2ee_Dodo on June 26, 2006 at 02:29 AM MDT #
The other million-dollar question few of these frameworks seem to address clearly is - what about ajax?
Ajax support in frameworks seems to break down into two camps:
I'm still waiting for a web framework that lets you build applications in a sensible ajax style - using ajax calls for the majority of user interaction, and only making a new synchronous HTTP requests where you need to go to a different functional part of the site. But still with the simplicity and transparency of a typical java web framework, rather than an opaque toolkit that says "trust me".
Posted by Korny on June 26, 2006 at 07:41 PM MDT #
Posted by Korny on June 26, 2006 at 07:43 PM MDT #
Posted by J.F. Zarama on June 26, 2006 at 08:11 PM MDT #
P.S. Korny: You don't have to "trust us"... download the source and take a look for yourself. Plus, ThinWire is used in multiple large scale applications, one with over 1000+ users.
Posted by Joshua Gertzen on June 29, 2006 at 03:11 PM MDT #
Posted by Anil Sharma on August 17, 2006 at 02:09 AM MDT #
Posted by Greg Ritchie on September 27, 2006 at 11:43 AM MDT #
Every time I read "generates code", I don't care if it's "generates just for you" or what. I hate generated code. I think generated code is a cop out for when the developer didn't really know how to solve a problem, and so instead made a tool to spit out a bunch of stuff.
Of course there are some exceptions (compilers). But most of the time I've seen code generated, it's because a person really didn't know how to solve it in any other way.
For example, generating getters and setters in Java vs. "free" getters and setters you get in Ruby. Or generating code for OR mapping, again, junk, in my opinion.
The only time it makes sense to generate code is when:
1. You are jumping a huge level of 10 of abstraction higher. For example, C generates ASM. I've used both, and C is miles and miles easier and higher level to write than ASM.
2. You will NEVER *return* back to the level of generated code abstraction. This means, once I use C, I pretty much never ever touch ASM again. In fact, many many people don't even know ASM, don't need to know it, and actually, could even *hurt* their ability to program effectively in higher level languages by knowing it.
Also, there is no significant jump in level of abstraction either. So the jump in level of abstraction is low, and the return back to the original level is pretty much guaranteed.
That means generation is flat out a *wrong* way to solve any problem in web development *right now*.
So, to all you generating fools, take this warning. :) And don't take it too seriously either. Don't burst a vein. It's just my 2c.
Posted by Leo on October 20, 2006 at 05:45 PM MDT #
Posted by Demián on November 21, 2006 at 11:28 AM MST #
Posted by Pieter van Onselen on February 02, 2007 at 01:45 AM MST #
Posted by yeth on April 03, 2007 at 10:26 AM MDT #
Posted by Philip Weaver on April 10, 2007 at 06:07 PM MDT #
Posted by 126.96.36.199 on April 10, 2007 at 06:10 PM MDT #
Posted by Renish Ladani on June 11, 2007 at 01:06 AM MDT #
I had the occasion to go back to Java for my new job, so I decided to give it a try at JSF, hoping that the best from ASP world would be there. What a disillusionment.... Yes, some things are in there, and it's definitely easier to learn and use than Struts 1.2, but... gosh, it sucks. JSF and HTML are COMPLETELY incompatible: I'm not joking, this is infamous. You just can't take a layout in html/jsp, and build a component with it - this means that you won't be able to include a web designer's work at all - this is fixed in JSP 2.1/JSF 1.2, and thats my luck, i haven't found an implementation that works, almost one year after your post. I've been stuck on a simple - simple ! the same things happen in the whole Java platform, their developers apparently don't know what that word means - a simple html fieldset/legend usage... hours later, dozens of blogs visited (some really good ones), no real answer, just hacks.
And OK, it's a component oriented framework, but come on, you really need lots of work to get something to work. That's not the idea of the 'component' part for such frameworks... I mean, the whole navigation rules seem already redundant or boring for ASP .Net developers, but trying to compare the ugly XML syntax + Java properties in JSF versus C# separated classes... this is sad, sad. And let's not talk about the visual support in IDEs such as Eclipse, Creator, Netbeans... first of all, no visual support for Eclipse at all (unless you use a Netbeans/Creator customized plugin, as i read guys at MyEclipse did... lol). The problem with support from Netbeans 6/Creator is, that as a consequence from the XML/XHMLT syntax, there's no tolerance for mistakes: you try to edit some html, and bang, you've lost hours of work, and of course, as I said, you can't ever edit your former JSP applications.
Some light at the end of the tunnel, oracle asf really has some nice components... that you can't use outside their server. Oh, I tried to mix tobago/myfaces and the RI... won't work either. In fact, all implementations are all so 'standard', that they won't work together ! What's the meaning of that word, 'standard', anyways?
I'm pissed, and maybe I'm unfair, but i would have never thought to be brought to claim 'Struts was always better than something'.
Posted by Felipe Cardozo on June 15, 2007 at 09:14 PM MDT #
Posted by Gavin on June 27, 2007 at 01:40 AM MDT #
Posted by Nitin Khare on July 25, 2007 at 11:15 AM MDT #
Posted by kiddies on August 24, 2007 at 01:55 AM MDT #
Posted by Steve M. on September 13, 2007 at 04:32 AM MDT #
Posted by Delphi's Ghost on October 03, 2007 at 04:01 PM MDT #
Posted by 188.8.131.52 on October 10, 2007 at 06:03 AM MDT #
Posted by toto on November 03, 2007 at 04:10 PM MDT #
1.) There are MANY, MANY JSF frameworks out there with all sorts of cool 'built in' AJAX widgets that are simple to use and have both professional and open support. You can get an idea of all of the available JSF frameworks by looking at this site: http://www.jsfmatrix.net/
2.) With the use of facelets & JSF, you can now combine those frameworks into a consolidated solution. In fact, many of the JSF frameworks now directly support each other in their test cases.
3.) Unlike other frameworks, like Tapestry, Webwork, etc, JSF has created a environment of competition. You have IceFaces, Richfaces, ADF, Webgalileo and a host of other JSF component makers pushing to make their widgets better than the others. This competition in the JSF space and has led to some really nice looking UIs. And as a developer, you do not have to choose one. Pick and choose your widgets from each for your solution. (some limitations)
4.) There are efforts to 'wrap' common frameworks like Yahoo UI! into JSF components. This will continue and will make it so that a developer will not need to learn all of the other frameworks out there, they can simply integrate the new JSF libraries.
I am a big fan of Rails, but always seem to run into issues when you want specialized functionality. For instance, we needed a treetable with inplace ajax editing and pagination. Have fun with that one. (although it may exist now). In JSF, there are at least 4 different frameworks which offer such functionality built in.
What I think is missing, and I kinda wanted to keep this on the "down-low" so I could create a library and get all the fame (but I have no time) is to create not only cool widgets, but functioning modules that are as simple as jsf tags.
I would like to see something like a <framework:login> tag that displays a username/password dialog with a button and has all of the supporting pieces required to be a fully functioning login module. Have not found that sort of thing yet. Once we start to go down that path and beyond simple cool widgets, thats when JSF be a huge player in this space.
Thats my two cents,
Posted by Mark Ricard on December 01, 2007 at 03:22 PM MST #
It is interesting all of the various frameworks that people are using. The common thread seems to be the grass is always greener if I use framework XYZ. Since it is new it must be better than my current framework. We have been using Apple's WebObjects since 1997 (it was released in 1995 by NeXT). It is still one of the more advanced and well designed Java frameworks ever built. It incorporates the most mature and capable object relational data access tool (Enterprise Object Framework also originally designed and built by NeXT). WebObjects has undergone continual upgrades, supports AJAX, web services, provides a complete component model with server side events, built in load balancing and multi server deployment and administration, etc.
When we first started developing with WebObjects, Apple charged $50,000/server for deployment licenses. The developer license was $2500/developer. WebObjects is currently distributed for free with all Mac OS DVDs and has freely deployable runtimes on all platforms. We deploy our WebObjects based apps under Tomcat, but they can deploy under any J2EE servlet container or can run as a standalone app using its built in application server. We use Eclipse for our development IDE using a plugin developed by the WebObjects developer community for the component and ORM modeling. We use ANT or Maven for builds just like every other framework.
Just like everything else that Apple has done - it is a well thought out product that is light years ahead of its competition. The basic architecture has been in place from the beginning - before ASP, JSP or Java even existed!!
All of these frameworks will come and go over the next couple of years - the original creators will get bored and move on to the next big thing. Selecting a java framework is a total crap shoot, you have to be prepared to rewrite your apps every couple of years because your current framework has either radically changed or is no longer being supported. Good luck to all of you jumping from ship to ship hoping things are better, as long as you are getting paid by the hour its a great strategy.
Posted by Dov Rosenberg on January 09, 2008 at 07:14 PM MST #
Matt is a psychic and dead on. The little piece below is cut and pasted from his comment on June 20, 2006 (shown up above). It has played out exactly like this, up to and including having to hire Rick and his subcontractors to do the heavy coding on JSF.
----------- > It also creates a FUD scenario where teams select JSF, because it is the "standard" and will have better "vendor support". I absolutely agree with this. The funny thing about JSF vs. Tapestry vs. WebWork (or XXX web framework) is you're likely to hire the same hot shots to help you implement an application with it. Who are these "hot shots"? Independent consultants who have experience putting a real application into production using the technology. You're not going to hire Oracle, IBM or Sun (or JBoss for that matter) to help you learn and use JSF - you're going to hire somebody that's done it. So from a hiring perspective, there's lot of JSF positions, but I doubt there's a lot of truly experienced developers out there. Except for Hightower of course, but I think he likes banging his head against the wall. ;-) Posted by Matt Raible on June 20, 2006 at 11:01 AM MDT
Posted by JSF Convert on January 10, 2008 at 02:24 PM MST #
Posted by tomjerry on February 11, 2008 at 03:42 PM MST #
Posted by Matt Raible on February 11, 2008 at 06:50 PM MST #
Posted by gantait on October 22, 2008 at 02:31 AM MDT #