Apache Struts Design goals and overview
by, 02-25-2012 at 07:36 PM (687 Views)
By using web form in a typical or standard Java EE web application, information gets submitted to the server. Information is then sent on to the Java Servlet, which will be performing:
• Information Processing
• Interaction with a database
• HTML formatted response is produced.
This information could also be passed on to a JSP that brings out the similar results. For larger projects, they are not suitable and it becomes tough to do the separation of the presentation layer, from application logic.
Struts basic goal is to separate the view layers & model. Design pattern of MVC is implemented by it. A separate controller is provided by the Servlet and it also provides the facility of writing down the view templates. Central configuration file struts, config.xml binds the model, controller and view. To handle it properly, programmer is responsible.
Actions performed are as following:
• In form of actions, requests are sent to controller, from the client.
• They are detailed in the configuration file.
• Corresponding Action class is called by the controller whose interaction is with business logic
Internationalization is also supported by the Struts and template mechanism known as Tiles is also included which permits the presentation layer to be consisted of the footer, independent header & also the content components.