Design Patterns

Design patterns are a group of collaborating Objects/Classes that can be abstracted from a general set of modeling scenarios. They are also known as parameterized collaborations.

Design patterns are an excellent means of achieving re-use and building in robustness. As patterns are discovered in any new project, the basic pattern template from previous engagements can be re-used with the appropriate variable names modified for the current project.

Patterns generally describe how to solve an abstract problem, and it is the task of the pattern user to modify the pattern elements to meet the demands of the current engagement.

Before using a pattern it must first be created as a standard UML diagram and then saved as an XML pattern file. This XML file can then be imported as a resource that can be used in any model.

Sparx-Created GoF Patterns:

To get you started with design patterns in Enterprise Architect, Sparx Systems provides you with an MDG technology for the patterns described in the book Design Patterns - Elements of Reusable Object-Oriented Software by Gamma et al., referred to as the 'Gang of Four' or GoF. These patterns are made available through  a set of Toolbox pages.

The pattern elements are drawn from the EABase.eap file, through the Resources window hierarchy. Therefore, if you are developing your model in a DBMS repository (or you inadvertently delete the GoF patterns from your .eap file) you can download them as a 'zip' file from www.sparxsystems.com/uml_patterns.html.

Because the patterns are drawn from the Resources window, if you delete a pattern in the Resources window the equivalent Toolbox item cannot work. Therefore, if you cannot drop a pattern element from the Toolbox, check that it is still available in the Resources window.

Learn more