Using UML Patterns within Enterprise Architect - WordPress.com

5 downloads 44 Views 82KB Size Report
Using UML Patterns within Enterprise Architect. Reference Guide. Overview. This document provides a reference guide to the use of patterns within Enterprise ...
Using UML Patterns within Enterprise Architect  Reference Guide  Overview  This document provides a reference guide to the use of patterns within Enterprise Architect, customized for the Business Engagement section within Technology Group of the Australian Government Department of Health and Ageing. It will provide: 1. A definition of patterns 2. How to import a pattern from file 3. How to use a pattern 4. How to create a pattern

Definition and Classification of UML Patterns  A pattern is a generalised solution to a commonly occurring problem. Patterns within the IT industry were originally popularised by the Gang of Four (GoF) with their 1994 book Design Patterns: Elements of Reusable Object-Oriented Software. This book described 23 patterns for software design. Since then analysis level patterns they have been developed others such as Martin Fowler and the Queensland University of Technology. Patterns within Enterprise Architecture should be classified according to their use. By default Enterprise Architect includes all 23 of the GoF design patterns. Other pattern categories have been added as appropriate.

Pattern Category 

User Defined?

Pattern Description 

GoF Behavioural Patterns

No

These patterns concern communication between objects.

GoF Creational Patterns

No

These patterns concern class instantiation.

GoF Structural Patterns

No

These patterns concern class and object composition.

Fowler Analysis Patterns

Yes

These patterns concern domain models. Includes patterns from health care and accounting domain.

Workflow Patterns

Yes

These patterns were specifically developed for workflow modeling (Activity diagrams in UML notation).

Business Engagement Patterns

Yes

Specific patterns that are frequently encountered when developing IT systems within the Department of Health and Ageing.

Importing a UML Pattern from File  1. Navigate to the Resource View within Enterprise Architect and right click on the UML Patterns folder icon. You should see the Import UML Pattern contextual menu. 2. Left click on this and it will prompt you to browse for your UML pattern. UML Patterns have a file name with a .xml extension.

Using a UML Pattern  Patterns can be added to either a new diagram or an existing diagram. They can be previewed by double clicking on the chosen pattern or using the right-click contextual menu. This will bring up a dialogue box which displays the pattern. A pattern will be displayed with: a short description, describing its intent and use; a preview of the diagram; pattern elements and element notes (which if they exist, will be displayed when an individual element is selected).

A pattern can be placed on a diagram in one of two ways: 1. Dragging from the Resources View directly onto the diagram; or 2. Right clicking on the pattern and selecting the contextual menu: Add Pattern to Diagram. The pattern will be created on the diagram, as per the preview. A user should match the pattern type to the diagram type. The preview window will give the user an indication of the correct diagram type that should be used. Note: The position will be where the original creator designated it, so it may overlap existing diagram elements.

Creating a UML Pattern Once you are happy with a diagram a pattern may be created from it. 1. Open the diagram that you wish to create the pattern from 2. Select Diagram -> Save Diagram as UML Pattern… 3. Fill out the fields in the dialogue box:

Field Name 

Field Description 

Pattern Name

This is the name that will appear in the UML Patterns directory.

Filename

Ensure this ends with .xml. Try and match it to the Pattern Name

Category Name

This should be one of the categories on page 1 of this guide. If none of these are appropriate, define your own and a new directory will be created automatically when users import your pattern.

Notes

This is a description of the use and intent of the pattern. Make it as generic and easy to read as possible.

4. Tick the Create box of the elements you want to include in your pattern. Any element notes will be created as comments for that element in the pattern.

Suggest Documents