Flux - The Smart Struts Config Generator
Getting Started
Prepare your environment as follows:
- Install Flux as Eclipse plug-in by unzipping it into your Eclipse
installation folder.
- Set up your drawing tool as described in the respective Flux
UML Tool
Guide.
For each Struts module of your web application you can go about as follows:
- Create a UML State/Activity Model describing the workflow of the module as
explained in the general UML
Modelling Concept and the Flux UML Tool Guide specific to your drawing
tool. The UML Tool Guide also explains how you have to save or export the
model to make it available to Flux.
- Create the initial version of the Struts module configuration by saving
the template file
struts-config-new_module.xml as struts-config-<your_module_name>.xml in
the WEB-INF folder of your application.
- You may want to check and possibly adapt the Flux preferences under the
Eclipse menu 'Window/Preferences/Flux'. See 'Preferences'
for details about them.
- You may want to check and possibly adapt the Flux properties assigned to
struts-config-<your_module_name>.xml in its context menu, which can be opened
by selecting the file, clicking the popup menu trigger (right mouse button)
and choosing 'Properties/Flux'. See 'Properties'
for details about them.
- Generate the update of struts-config-<your_module_name>.xml from the model
by selecting 'Flux/Re-generate from model' in the config's context menu. Make
sure you are online to the Internet when you execute Flux or change the
references to the DTDs in the XML input to Flux.
- Check the results of the generation (use a diff tool!) and possibly manually enrich the
struts-config-<your_module_name>.xml now with attributes and elements that are
not covered by the model and what is generated from it (see the
edit rules for details on what you may or need to change manually).
-
Add strux-1.0.1.jar to the
classpath of your web application if the generated struts-config-<module>.xml
references the de.matthias_burbach.strux.* classes (which is the case
as long as you don't change the Flux preferences 'Framework dispatcher action
class', 'Framework relay action class', 'Framework enter module action class'
and 'Framework final state action class'. See 'Framework
Concept' for details on this.
- Implement the actions, pages and the like as your application requires and
re-iterate the modelling and generation activities described above as needed.