Working with Architectures

Cultivate allows developers to define a project specific software architecture. A architecture consists of layers, grouping packages, and dependencies, representing call relations between layers. Example would be the model-view-control architecture where the model-layer calls the view-layer, and the control-layer is the exclusive caller of the model-layer. By using the 'Metric and Smell View' developers see which code statements violate their architecture.

Defining an Architecture with the Wizard

By using the supplied wizard, a developer is guided to create an architecture easily. To open the wizard, create a new Architecture Description via the Eclipse new file dialog.

Creating an architecture description

After creating the architecture file, the architecture editor is used to specify the concrete architecture. In the screenshot below, the architecture file is marked by 1. The editor menu is available by clicking the triangle at position 2.

The architecture.pl in the project + How to open the editor palette

Using the Editor

The Editor allows to define layers and access rules between layers. Click and drag a layer from the editor palette onto the main view to open the Edit Layer dialog. Each layer has a name and consists of packages. Either the packages can be manually selected, or they are selected via a wildcard name definition, using the new button.

Editing layers

To define access rules, after adding the layers, select the Arrow from the editor palette and drag the arrow between two layers. By connecting layer A with an arrow to layer B, layer A may access layer B, but B is not allowed to access A.

Editing the architecture description

Working with the defined architecture

The Architecture Plugin provided two smells checking the defined architecture. Both can be selected via the Smells and Metrics View, or their markers can be activated. The first smell checks, if each package is assigned to exactly one layer. The other shows the exact violation-locations in the code of the architecture.

The defined architecture is used, as soon as the file is saved.
Last modified: 2014/04/09 00:04
 
*