Guidelines for Struts Application Development


Struts application development in enterprise applications requires desicipline. We are not referring to any particular methodology; just some guidelines for Struts based application development for enterprise applications. In this section a step-by-step approach for Struts application development cycle is provided.

  1. First design your flow at a usecase level on a whiteboard. A JAD session with business expert, page author and developer is recommended. JAD stands for Joint Application development. Judging by its name , you might think that this technique only applies to developing software, but that ‚ s not the case. The JAD technique can be applied to a wide variety of areas where consensus is needed.

  2. Decide how many forms are involved in the flow. Which comes when and so on. This will tell you which form should be in request and session scope. (If possible, try to maintain as many forms in request scope).

  3. Forms in a web application have aspects related to it ‚ Creating and populating a form and setting in the right scope before display and handling the submitted form. Decide when each of this would happen.

  4. The JAD session will give following inputs:

    • Page author knows which form to create and navigation using DynaActionForm (Refer to Chapter 5 for more on DynaActionForm) and navigation using ForwardAction with < html:link >

    • Application developer knows what inputs are availble for the business logic invocation methods (Session EJB methods )

  5. Application developer designs the business logic for each page (not the Action class) and unit tests them and page author develops and formats the pages. Both tasks can occur in parallel.

  6. Application developer creates Form and Action using the DynaActionForm and updates the struts-config.xml and invokes the already tested business logic from Action classes.

  7. Page author and developer integrate the pieces and unit test them with StrutsTestCase (http://strutstestcase. sourceforge .net/).




Struts Survival Guide. Basics to Best Practices
Struts Survival Guide: Basics to Best Practices (J2ee Survival Series)
ISBN: 0974848808
EAN: 2147483647
Year: 2004
Pages: 96

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net