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.
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.
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