Applying patterns
About this task
Design patterns capture frequently used or complex structures and processes and their use eliminates redesign and promotes software consistency.
- IBM Rational design patterns
Patterns can solve a singular problem or apply to a specific use case. Patterns can also employ other patterns or systems of patterns in their solutions. The challenge of pattern design is to determine the repeatable structure or process and transform it into a reusable design. Pattern authors can use the IBM® Rational pattern capability to design patterns from the most simple to the very complex. - Setting preferences for patterns
You can set several default preferences for how pattern instances appear in diagrams. For example, you can specify the shape of pattern instance collaborations, select how the bound state of parameters is displayed, or change the default patterns framework used to create the pattern libraries. You might change these settings if you prefer a specific display style, want to make diagrams easier to view, or need to use a different framework. - Selecting patterns to apply
You can search for a pattern by using keywords to match pattern data in the RAS repositories that are available to you. From the list of search matches, you can choose to view patterns in the RAS Asset Explorer view to narrow your selection. You can import a pattern directly from the Search view. - Creating pattern instances
The first part of applying a pattern is creating a pattern instance in the target model. You can use the Apply Pattern wizard or create the instance by using various drag and drop gestures. - Specifying arguments for pattern instances
You add argument values to a pattern instance in the Project Explorer view or in the diagram editor by using the Pattern Parameters page of the Apply Pattern wizard. In the diagram editor, you can also use drag and drop gestures to specify values. - Importing patterns
Patterns are Eclipse plug-ins packaged and stored as RAS assets. You import RAS pattern assets to install the pattern plug-in. Then you can apply the patterns contained in the RAS asset. You can import RAS pattern assets from a directory location or from a RAS repository. - Modifying pattern instances
After you apply a pattern, you can add to, remove, or replace any of the bound arguments in the pattern instance until you have the results you want in your design model. You can also modify the bound argument elements. If necessary, you can reapply or remove the pattern.
Related information:
Feedback