The Struts Framework is a standard for developing well-architected Web applications. It has the following features:
The Struts Framework, itself, only fills in the View and Controller layers. The Model layer is left to the developer.
The diagram below describes the flow in more detail:
- Open source
- Based on the Model-View-Controller (MVC) design paradigm, distinctly separating all three levels:
- Model: application state
- View: presentation of data (JSP, HTML)
- Controller: routing of the application flow
- Implements the JSP Model 2 Architecture
- Stores application routing information and request mapping in a single core file, struts-config.xml
The Struts Framework, itself, only fills in the View and Controller layers. The Model layer is left to the developer.
The diagram below describes the flow in more detail:
- User clicks on a link in an HTML page.
- Servlet controller receives the request, looks up mapping information in struts-config.xml, and routes to an action.
- Action makes a call to a Model layer service.
- Service makes a call to the Data layer (database) and the requested data is returned.
- Service returns to the action.
- Action forwards to a View resource (JSP page)
- Servlet looks up the mapping for the requested resource and forwards to the appropriate JSP page.
- JSP file is invoked and sent to the browser as HTML.
- User is presented with a new HTML page in a web browser.
0 comments:
Post a Comment