Design patterns used in Struts 1x
- MVC: Struts framework is based on Model 2 MVC pattern.
- FrontController : Provides a centralized controller (ActionServlet) for managing the handling of requests.
- Command pattern: Struts controller uses the Command design pattern.
- Adapter pattern: Action classes use the Adapter design pattern.
- Template pattern: The process() method of the RequestProcessor uses the Template method design pattern.
- Composite View: Used in Struts Tiles.
- Value Object (VO) / Context object: Form Beans that encapsulate the values entered on a form.
- Chain of Responsibility pattern (CoR): Request Processor is composed using commons chain, which is an implementation of CoR pattern.
- Dispatcher View: Using ActionMapping to forward the flow to the View after performing some business logic from the action class.
- View Helper: Encapsulates logic that is not related to presentation formatting into Helper components.
- Service to Worker: Combines a Dispatcher component with the Front Controller and View Helper patterns.
- Synchronizer Token: This strategy addresses the problem of duplicate form submissions. Uses this strategy to control direct browser access to certain pages.
- Struts 2 uses Inversion of Control (IoC) pattern also known as dependency injection.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.