Guidelines for Struts Application Development
By: Jagan
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
areas where
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/).
Archived Comments
Comment on this tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Configuring JDBC DataSources in Struts
When is the best time to validate input in Struts
Simple example of using the requiredif Validator rule in Struts
How to prepopulate a form in Struts
Using JavaScript to submit a form in Struts
FAQ: Why are my checkboxes not being set from ON to OFF?
FAQ: Why was reload removed from Struts (since 1.1)?
What is a Plug-in and how to use Java plug-ins with Struts?
Origin and Architecture of Struts
Handling multiple buttons in HTML Form in Struts