Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The Struts Framework

 
Sam Furtado
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !
Everyone seems to be talking about struts ... can someone please tell me what are the major benefits in using "Struts" ??
Thanks Guys !!!
Regards
Sam
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In short, the use of existing frameworks prevents you from reinventing the wheel. With these web frameworks (Struts, Turbine, etc.) the "wheel" is related to form processing, constructing a user interface, separation of logic and presentation (MVC), and the like.
What's so great about Struts specifically, I don't know enough to say, but I believe the folks here will be more than happy to tell you about it...
 
Hernando Guerra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
normally you use servlet OR jsp to implement java web applications, with struts you could use both, servlets por data procesing (with is a lot easier with servlets) and HTML generation with JSP (a lot easier too) in a very simply way...
you can reuse jsp forms, etc..
I recommend you http://www.onjava.com/pub/a/onjava/2001/09/11/jsp_servlets.html
 
David Attard
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a sort MVA framework for developing web applications. We have used it on a significantly large project, and it has a lot of advantages. You have to see them working, and on large projects to really realize the advantages they have.
I think for smaller projects, the learning curve is quite significant, and maybe the advantages not so large.
 
Helen Crosbie
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the advantages of using Struts over other frameworks?
We've been using Cocoon to transform XML into pages for our multi-page data entry app, with Java and JSP behind and it seems to work pretty well. Would this have been neater/faster/easier-to-maintain with Struts?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Helen Crosbie:
...We've been using Cocoon to transform XML into pages for...

Helen, what is your opinion about using Cocoon to serve dynamically generated XML documents? Does Cocoon provide support for this or is it mainly geared towards transforming XML to presentation markup?
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At risk of sparking off a "my framework is better than your framework" slug-fest, might I contribute my rather negative thoughts about Struts versus the framework that we chose?
Struts does indeed seem to provide a framework for building a Web application with an MVC architecture (a Good Thing). However, it seems terrifically big and complicated for the job. Plus its documentation and tutorial don't exactly help. My feeling is that it's a framework suitable only for a big project, where perhaps one can afford the time and money to send everyone on a Struts training course (such things do exist, even in the UK).
Further, although Struts can be used with a variety of View technologies, it quite strongly prefers JSP. If you don't like JSP (and I don't), Struts may not be the thing.
May I put in a word for Maverick? This is a much simpler MVC framework. It is neutral about View technologies; it is happy with JSP, but also with my favourite Velocity and XSLT, to name but two more. The simplicity means that you'll be ready to start prototyping after an afternoon with the documentation, rather than a week in a pricey training course.
Although it's perhaps not a shining example, you can see Maverick and Velocity in action on my personal Web site, at www.fridaysoft.co.uk.
 
Ruud Steeghs
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tricky question, if maverick is so much easier to learn: why is struts far more popular than maverick? has struts been around that much longer?
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Struts is a bit older (first usable version early 2001) than Maverick (first usable version late 2001). But I suspect that the fact that Struts is part of the popular Jakarta suite has more to do with it.
 
Sam Furtado
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !!!
Thanks a lot for these useful links and your views on the "Struts" Framework ... i appreciate each of them.
Thanks once again !
Regards,
Sam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic