This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Struts can be considered a model 2 framework: ther are controllers which add logic (data processing, flow control...) and dispatch to the view compoments.
There are many other frameworks with this approach but unfortunately I have no real experience with all of them, so I would be interested to know what are the advantages (and drawbacks) of Struts 2 vs. other popular frameworks like JSF, Velocity, Tapestry, Wicket...
Iván Párraga García
SCWCD 5, SCJD, SCJP 5, MySQL 5 DBA
I don't think it is a fair comparison between Struts 2 and the list you had. A fairer comparison would perhaps be between Struts 2 and SpringMVC. As you have stated, there're bound to be pros and cons in each technology out there, so it's really just a matter of using the right tool for the right job.
I agree with your answers. My question could be asked again like this: "what is the right tool for the different kind of projects?" and "which tool could be compared in a fair fashion with Struts (and then pros and cons)?"
For example, in what Spring MVC + Tapestry beats Struts 2 (and vice versa)?
Yes, a comparative analysis between the different frameworks would be really helpful. Moreover, can someone please explain in what ways Struts 2 is any better than Struts 1 and, for that matter, how does it compare with a well-designed web application written using only JSPs, Servlets, JSTL, EL and Design Patterns ?
Cheers,<br />Sougata Som
Joined: Apr 02, 2004
Yes, a comparative analysis between the different frameworks would be really helpful. Moreover, can someone please explain in what ways Struts 2 is any better than Struts 1 and...
Take a look at this link. At the bottom of the page, there're links to PDFs that compares between various web framework (by Matt Raible, 2005). As for why is Struts 2 better than Struts 1, to me, if you had never used Struts 1, you may not really appreciate what Struts 2 is doing for you now.
...for that matter, how does it compare with a well-designed web application written using only JSPs, Servlets, JSTL, EL and Design Patterns ?
Struts 1 or 2 is an implementation of design pattern (MVC). You could always build your own application framework from scratch, but why do it when you could pick Struts or Spring off the shelf and use it? Essentially to develop a web application, you could either develop everything yourself or be a director and piece together the right tools available to help you shorten the time and effort needed. Yes, no doubt you could design and develop a good application framework, but why duplicate the effort if there's no value add. It really depends on what is your job. Is your job to design and build application framework or web application. If it is to build web application, you're better off picking up a mature, well tested and widely use framework such as Struts.
Joined: Dec 02, 2007
Great comparative! Thanks for the link!
I've not used Struts 2 yet but I can see that most of the problems I encountered with the version 1 have been addressed now.
I'm impatient to have the opportunity to use it in a new project.
I think that most of the comparisons, such as Raible's, don't really get into enough detail to support a choice between frameworks. These things are just to complex to do a sort of hello world comparison with. But this is just my opinion.
My advice is that you pick one that is new. You want something that reflects the latest and greatest practices, and that's not going to be in a framework more than a few years old.
I would say that Spring MVC, Struts 2, Seam etc. All of these are good, honestly.
Originally posted by chad michael davis: I think that most of the comparisons, such as Raible's, don't really get into enough detail to support a choice between frameworks. These things are just to complex to do a sort of hello world comparison with. But this is just my opinion.
I don't think that Matt's comparisons are based on hello world. Matt created AppFuse project for all primary Java web frameworks. AppFuse has Register, Login, CRUD, bookmarking, security, integration with other frameworks lablabla... Recently, LinkedIn hire Matt to evaluate their home-developed web framework and to check whether if they can migrate to an open source framework. I think Matt comparisons worth reading...
Joined: Apr 02, 2004
Originally posted by chad michael davis: My advice is that you pick one that is new. You want something that reflects the latest and greatest practices, and that's not going to be in a framework more than a few years old.
Agreed. If you've the luxury of using new proven technologies, do it!
chad michael davis
Joined: Mar 01, 2006
I didn't mean to suggest that Matt Raible's comparison was on the helloworld level. I just mean that it you probably need first hand experience to make the decision, if the decision is up to you, on which framework will better suit your needs.
I guess I just don't believe that there's a hands down, objective winner. It's such a complicated matter, and that's not even considering stuff like corporate investments in technology, at the developer and codebase level. I wouldn't want to be the guy having to decided this kind of thing for a big company.
Joined: Apr 29, 2008
Hi, Chengwei Lee. Thanks a lot for the links. I have some experience with Struts 1 but it's not extensive and I am currently working on a project which uses its own framework built from scratch. I'm relatively new to application development and I guess I'll take some time to really appreciate the pros and cons of all these different frameworks.
Joined: Apr 02, 2004
I am currently working on a project which uses its own framework built from scratch.
Personally I feel this could be a good learning experience, if you're part of the team who is doing this framework design and building. But to me, I would rather make use of whatever is available rather than reinventing the wheel.
Unless there is some compelling reasons to build a new application framework from scratch, time and effort need to be justified. There should be some or significant value add to justify the need to build a framework from scratch instead of using whatever is mature and proven out there.