Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

when and when Not to use Struts.

 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic