Struts application development in enterprise applications requires discipline. We are not referring to any particular methodology; just some guidelines for Struts based application development for enterprise applications. In this section a stepby-step approach for Struts application development cycle is provided.
- 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
consensus is needed.
- 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).
- 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.
- 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)
- 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.
- 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.
- Page author and developer integrate the pieces and unit test them with StrutsTestCase (http://strutstestcase.sourceforge.net/).
Most Viewed Articles (in Struts )
Latest Articles (in Struts)
Comment on this tutorial
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews