Features of the Andromda Struts Portlet Demo

The Andromda Struts demo portlet uses the Struts Bridge. This demo provides tips, hints, and tricks necessary to run portlet applications created using the Andromda BPM4Struts cartridge. Page flow is defined using UML activity diagrams. The project framework is generated using Andromda 3.2 . The original project is based on the Andromda Maven 2 plugin .

Andromda Overview

Andromda is a code generator for Model Driven Software Development and Model Driven Architecture.

Using UML entities one can model an applications page flow, services, and entities in an platform independent way.

Cartridges are platform specific templates and metaobjects used to interpret the models. Andromda comes with cartridges for Java, EJB, Struts, JSF, .Net, and Spring.

Andromda BPM4Struts Cartridge

The BPM4Struts cartridge generates a Struts pattern for page flow and form input and validation from UML activity diagrams.

A Use Case is modeled as a point of entry.

Each Activity Diagram defines a starting point which indicates the start of Use Case execution.

One or more Action States defers to business logic.

One or more Action States defined as a FrontEndView stereotype represent the page views.

Forms are defined using a Signal Event by which each parameter can be typed and validated.

End points are used to indicate which Use Case is executed next.

Merge Mappings and Merge Locations

Customizing a cartridge is done by adding Merge Mappings and or Merge Locations. They are the most common method used to modify the default cartridge output.

Merge mappings replace or inject template code in the default cartridge templates.

Merge locations define directories where entire templates can replace the default templates used to generate code.

Portlet Modes

The BPM4Struts cartridge provides help documentation for each of the use cases defined. The demo points the Help mode to this action displaying Use Case documentation describing the application.

Any Use Case can be specified for other portlet modes. The demo points the Edit mode to an appropriate Use Case.

Controller

A controller is defined in UML and is used to execute business logic.

The controller is associated with an activity diagram. Any operation defined can be called by a Action State entity in the associated activity diagram. Each controller operation argument is represented by Struts form property if the Action State is modeled before a page view.

Andromda generates a class where project developers implement the logic associated with controller operations.

View

Views are defined using the FrontEndView meta model stereotype.

Displaytag Support

The Displaytag project tag libraries are used by the demo for presenting data in a table view.

See the displaytag.properties.vsl template for defining project properties such as sorting and presentation features.

Spring Services

TODO: Include support for modeling Spring services and Object Relational Mapping of Entities