Explain the design patterns used in Struts.- The Struts design pattern has N-tier architecture.
- This includes MVC architecture, Web applications characters, struts framework which includes – architecture, design patterns and coding idioms.
N-Tier architecture :
- The architecture includes the following layers and functionalities:
Layer Functionality Client User Interface Presentation Page Layout Control Command Business Logic Business Delegate Data Access   Domain Model Resources Database, enterprise services
MVC Architecture :
- The MVC architecture will isolate Model, View and the Controller functionality , which eases the development of the web applications without intervention of a database programmer with a web page designer to that of the controlling the application.
Web Application Characteristics :
- Browsers used to display the text. - Objects makes the domain model. - The data persistence is usually in relational databases. - The flow of pages changes.
Struts Framework :
- A request from a HTML page will be sent to Struts Servlet that creates a form
- This form is sent to the ActionForm subclass. Any HTTP parameters may be sent to this subclass.
- Form validation process is sent to ActionForm subclass.
- Execution of ActionForm subclass methods and returns a forward page
- The forward page is sent to the JSP.
- The response in the form of HTML will be sent to the Client.Explain the design patterns used in Struts.- Model-View-Controller (MVC) design pattern principle can be used to resolve issues like robustness, maintainability, localization, etc.
- The MVC design pattern calls for a separation of code by their function:
1. Model: Controls data access and persistence. 2. View: Handles how data is presented to the user. 3. Controller: Handles data flow and transformation between Model and View.
|