Struts

The Model-View-Controller (MVC) Design Pattern in Struts2.0 Framework
adplus-dvertising
Previous Home Next

Introduction:

The MVC pattern provides a separation of concerns that applies well to web applications. Separation of concerns allows us to manage the complexity of large software systems by dividing them into high-level components .The MVC design pattern identifies three distinct concerns: model , view and controller .In Struts 2, these are implemented by the Action, Result, and FilterDispatcher , respectively.

Class/Library File Descriptions:-

  • Model-Action: The model is implemented by the Struts 2 action component. But what exactly is the model The model is the internal state of the application. This state is composed of both the data model and the business logic.
  • View-Result: The view is the presentation component of the MVC pattern. the result returns the page to the web browser. This page is the user interface these are commonly JSP pages, Velocity templates, or some other presentation-layer technology.
  • Controller-FilterDispatcher: The role of the controller is played by the Struts 2 FilterDispatcher. The FilterDispatcher class controlling the over all work flow in the struts2.0 framework.
Previous Home Next