RE: What Web Application framework should you use?

来源:百度文库 编辑:神马文学网 时间:2024/06/30 22:04:52
RE: What Web Application framework should you use?Tim O‘Brien has an interesting post titledWhat Web Application framework should you use?.The first thing I noticed about this post is the permalink. It lookslike he started with "Isn‘t Rails supposed to change...", which makesme wonder what the rest of the title was. In this post, he rags on JavaWeb Frameworks and the lack of a clear path for choosing one. He endsup predicting that many will stick with Struts 1.x (poor bastards) andthose that aren‘t tied to Java should move to Rails. I don‘t have aproblem with folks moving to Rails, but I would like to comment on theJava Web Framework space and Tim‘s comments.
He says:
Prediction: The confusion over what is happening overat Struts is going to discourage people from continuing to use it. TheStruts team did the right thing in recognizing that Struts 1.x was adead-end, but that project needs a single public message. Is it StrutsAction or is it Struts Faces? Or is it two frameworks capitalizing onthe Struts brand name?
I think what is going on in the Struts project is definitely twoframeworks capitalizing on a brand name. That was a concious choice onthe project‘s part when they chose to start creating sub-projects. Theinteresting thing about Struts Shale is it‘s largely a prototype forJSF 2.0. Furthermore, it was rejected by many Struts developers asbecoming Struts 2.0. Why? BecauseJSF sucks. Especially when used with JSP - which is what most folks are doing.
JSF continues to be the most over-hyped under-used framework inJavaland. If you read the blogs of first-time users, you‘ll find manycomplaints and issues on how things work. Granted, most of theseproblems are with JSP and the implementation, but still. If I were incharge of JSF, I‘d dump JSP altogether, bundle Facelets with it andallow more flexible page navigation (including controller-to-page).Don‘t get me wrong, I like the ideas behind JSF, I just don‘t like theimplementation (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 findsomeone that still likes Struts, ask them if they‘ve used WebWork.Chances are they‘ll say no. As far as Tapestry is concerned, thelearning curve is too high. It‘s been rejected time and time again bymy clients because of the learning curve. Are they going to fix this?Yep, they‘re going to re-write the whole damn thing - again! Everymajor point release of Tapestry throws backwards-compatibility out thewindow. 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‘veused 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 Idon‘t. It (obviously) has the best Spring integration, but I‘ve foundWebWork much more pleasurable to work with. Sure, Spring has aThrowawayController, but with a name like that, you can tell it‘s asecond-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 itsupport JSF, but it‘s easy to learn, test and use. Furthermore, it seems to be the most often used framework inmajorsoftwareproducts andwebsites.
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 into get folks riled up. I‘ve never put a JSF, Tapestry or Spring MVCapplication into production (except for AppFuse of course), so most ofmy opinions are likely without foundation. In wonder how manyapplications Mr. O‘Brien has put into production with these frameworks?