Wednesday, September 5, 2007

Struts 2 Architecture





At its core, Struts 2 is a Command pattern implementation. The framework encapsulate the execution of the action. Because you 're calling actions through a framework, you can configure the framework to add services around the call.

The ActionInvocation object provides access to the runtime environment such as action, interceptor, context (request parameters, session parameters, user locale, etc), result. It represents the current state of the execution of the action. e.g., it maintain the state and know which interceptor has been invoked.

ActionProxy serves as client code's handler.
ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy(namespace, actionName, context)

No comments: