• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

when and when Not to use Struts.

 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have no Struts experience but am comfortable with JSP and Servlets. My understanding of Struts is that it helps to provide a clear division of the web roles (web designer, component developer and the database developer). This is done by using actions.
Can someone tell me when is Struts is appropriate and more importantly when is it not.
Thanks
Chris.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Harris:
Can someone tell me when is Struts is appropriate and more importantly when is it not.

In my opinion, Struts is most useful when your application contains a lot of form handling (i.e. if you're writing an application with machine-to-machine XML interfaces only, Struts won't be of that much help). Further, Struts does have some learning curve/overhead so for the most simple applications it might be more productive to write straight Servlet and JSP code instead of using Struts. It's close to impossible to say anything more specific, I think.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My understanding of Struts is that it helps to provide a clear division of the web roles (web designer, component developer and the database developer).


Sort of... Struts is based on a design pattern called the Model-View-Contoller "invented" and first used I believe by Smalltalk developers. Essentially there is a separation of the presentation layer (View) from the business logic(Model). The controllers responsibility is to monitor incoming requests and send them to the appropriate view. It most closly resembles the J2EE design pattern Front Controller design pattern.
It may not necessarily divide the tasks between the different roles, but it will make an HTML developers life easy not to have to see a ton of java scriplets in the source code while allowing a component developer to concentrate on business logic.
Hope that helps
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic