Wednesday, March 4, 2009

What is struts? Struts Application / Features / Working

Struts is a flexible control layer based on standard technologies like Java Servlets, JavaBeans, ResourceBundles, and XML, as well as various Apache Commons packages, like BeanUtils and Chain of Responsibility.

The framework helps you create an extensible development environment for your application, based on published standards and proven design patterns.

The framework provides its own web Controller component and integrates with other technologies to provide the Model and the View.

The framework's Controller acts as a bridge between the application's Model and the web View.

  1. When a request is received, the Controller invokes an Action class.
  2. The Action class consults with the Model (or, preferably, a Facade
    representing your Model) to examine or update the application's state.
  3. The framework provides an ActionForm class to help transfer data between Model and View.
  4. Most often, the Model is represented as a set of JavaBeans.
  5. Typically, developers will use the Commons BeanUtils to transfer data between ActionForms and the Model objects (or a Facade).
  6. Preferably, the Model will do the "heavy lifting", and the Action will act as a "traffic cop" or adapter.

Followers