You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2002/12/29 12:44:48 UTC
cvs commit: jakarta-struts/doc/faqs apps.xml project.xml index.xml
husted 2002/12/29 03:44:48
Modified: doc/faqs project.xml index.xml
Added: doc/faqs apps.xml
Log:
Move Building Apps from UserGuide to HowTo. Add Quick Links to project menu.
Revision Changes Path
1.9 +17 -2 jakarta-struts/doc/faqs/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/faqs/project.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- project.xml 29 Dec 2002 01:19:32 -0000 1.8
+++ project.xml 29 Dec 2002 11:44:48 -0000 1.9
@@ -24,6 +24,9 @@
href="actionForm.html"
name="Action Forms"/>
<item
+ href="apps.html"
+ name="Building Apps"/>
+ <item
href="database.html"
name="Database"/>
<item
@@ -43,10 +46,22 @@
name="Netbeans"/>
</menu>
- <menu name="Struts">
+ <menu name="Quick Links">
<item
- name="Welcome"
+ name="Welcome"
href="../index.html"/>
+ <item
+ name="News and Status"
+ href="../news/index.html"/>
+ <item
+ name="Resources"
+ href="../resources/index.html"/>
+ <item
+ name="User and Developer Guides"
+ href="../userGuide/index.html"/>
+ <item
+ name="FAQs and HowTos *"
+ href="index.html"/>
</menu>
</project>
1.8 +4 -0 jakarta-struts/doc/faqs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/faqs/index.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- index.xml 29 Dec 2002 01:19:32 -0000 1.7
+++ index.xml 29 Dec 2002 11:44:48 -0000 1.8
@@ -38,6 +38,10 @@
</li>
<li>
+ <a href="actionForm.html">Building Applications</a>
+ </li>
+
+ <li>
<a href="database.html">Accessing a Database</a>
</li>
1.1 jakarta-struts/doc/faqs/apps.xml
Index: apps.xml
===================================================================
<?xml version="1.0"?>
<document url="./apps.xml">
<properties>
<author>Dan Walker</author>
<author>Ted Husted</author>
<title>Building Applications</title>
</properties>
<body>
<chapter name="How to Build Applications" href="building_apps">
<section href="intro" name="About This Document">
<p>
This document outlines one possible sequence of development steps that can be followed to create a
Struts application. It is not intended as a complete description of each
referenced development activity. More detailed documentation is available
elsewhere and is referenced by "(more...)" links where possible.
</p>
</section>
<section href="caveats" name="Caveats">
<ol>
<li>Requirements development and design are outside of the scope of this document.</li>
<li>For help installing Struts, see the <a href="installation.html">Getting Started</a> chapter.</li>
<li>There are many other ways to approach Struts development and there are many
other features available besides the ones discussed below. This document
outlines only one way to get started.</li>
<li>This document focuses on form/data centric applications, but may also work with
other types of applications.</li>
<li>This material was written for Struts 1.1 (beta 2).</li>
</ol>
</section>
<section href="overview" name="Overview">
<ol>
<li>Implement data entry forms as JSP files.</li>
<li>Implement one or more <code>ActionForm</code> descendents to buffer data
between JSPs and Actions.</li>
<li>Create an XML document that defines the validation rules for your
application.</li>
<li>Implement one or more <code>Action</code> descendents to respond form
submissions.</li>
<li>Create <code>struts-config.xml</code> to associate forms with
actions.</li>
<li>Create or update <code>web.xml</code> to reference
<code>ActionServlet</code>, taglibs used by Struts.</li>
<li>Parallel Tasks</li>
<ol>
<li>Building</li>
<li>Unit Testing</li>
<li>Deployment</li>
</ol>
</ol>
</section>
<section href="details" name="Details">
<ol>
<li>Implement data entry forms as JSP files.</li>
<ol>
<li>Use elements from the <code>html</code> taglib to define the form
elements. <a href="struts-html.html">(more...)</a></li>
<li>Use <code>message</code> and other elements from the
<code>bean</code> taglib to define the labels and other static text
of the form. <a href="struts-bean.html">(more...)</a></li> <ol>
<li>Create and maintain a properties file of the text elements to be
displayed. <a href="preface.html#resources">(more...) </a></li>
</ol>
<li>Use <code>property</code> attributes to link form fields to
<code>ActionForm</code> instance variables.</li>
</ol>
<li>Implement one or more <code>ActionForm</code> descendents to buffer data
between JSPs and Actions.</li>
<ol>
<li>Create get/set pairs that correspond to the property names in your
related JSP form. Example:
<pre><html:text property="city" /></pre>
needs:
<pre>getCity() and setCity(String c)</pre></li>
<li>When needed, create a <code>reset</code> method that sets the fields of the
<code>ActionForm</code> to their default values. Most ActionForms do
not need to do this.</li>
</ol>
<li>Create an XML document that defines the validation rules for your
application.</li>
<li>Implement one or more <code>Action</code> descendents to respond to form
submissions.</li>
<ol>
<li>Descend from DispatchAction or LookupDispatchAction if you want one class
to handle more than one kind of event (example: one Action to handle
'insert', 'update' and 'delete' events, using a different "surrogate"
execute method for each).
<a href="http://husted.com/struts/tips/002.html">(more...)</a></li>
<li>Use the <code>execute</code> method (or its surrogates) of your
Action class to interface with objects in your application responsible
for database interaction, such as EJBs, etc. <!-- [:TODO: find good doc to link to] --></li>
<li>Use the return value of the <code>execute</code> method (or its surrogates)
direct the user interface to the appropriate next page. <!-- [:TODO: find good doc to link to] --></li>
</ol>
<li>Create <code>struts-config.xml</code> to associate forms with
actions. The file minimally needs:</li>
<ol>
<li><code><form-beans></code> section to relate form-beans with ActionForms
<a href="building_controller.html#config">(more...)</a></li>
<li><code><action-mappings></code> section to relate <code><html:form>
</code> actions with Action classes <a href="building_controller.html#action_classes">(more...)</a> </li>
<li><code><message-resources></code> to make your ApplicationResources
available to the rest of the app</li>
<li><code><plug-in></code> section to link in the Struts validator and other extensions<a href="building_controller.html#plugin_classes">
(more...)</a> </li>
</ol> <li>Create or update <code>web.xml</code> to reference
<code>ActionServlet</code>, taglibs used by Struts. <a href="building_controller.html#dd_config">
(more...)</a></li>
<li>Parallel Tasks</li>
<ol>
<li>Building</li>
<ol>
<li>Use Ant. It can compile, create WAR file, perform XSLT
transformations, run unit tests, interact with version control
systems, clean up, etc. <a href="http://jakarta.apache.org/ant">
(more...)</a></li>
<li>Create and use build script incrementally, as you create files
that need to be copied, compiled, etc. </li>
</ol>
<li>Unit Testing</li>
<ol>
<li>Unit test normal java beans with JUnit.
<a href="http://www.junit.org"> (more...)</a></li>
<li>Unit test JSP, taglibs and conventional servlet components with
Cactus. <a href="http://jakarta.apache.org/cactus"> (more...)</a></li>
<li>Unit test Action servlets with StrutsTestCase.
<a href="http://strutstestcase.sourceforge.net"> (more...)</a></li>
<li>Add all unit tests to the build script as a separate target.
This target should use the <code>junit</code> tag to launch each
TestCase descendent. <a href="http://jakarta.apache.org/ant/manual/OptionalTasks/junit.html"> (more...)</a></li>
</ol>
<li>Deployment</li>
<ol>
<li>Build script should create a war file containing the files developed
above, along with files that make up the Struts framework. <!-- [:TODO: describe this further, look for doc to link to] -->
</li>
</ol>
</ol>
</ol>
</section>
</chapter>
</body>
</document>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>