Providing a User Experience Around a Pattern

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

You want to make it easier for developers in your organization to use patterns in .NET development projects. You have chosen a specific set of design patterns, including the Observer and Factory patterns. The patterns you have chosen have the following properties:

  • Each pattern describes a recurring problem and a generalized solution.
  • Each pattern addresses a single, finely scoped domain.
  • Each pattern is described at the design level and describes the structure and relationships of one or more classes.

You want to add an integrated user experience to simplify development using patterns.

Scenario Goals

You want to use the features of the Guidance Automation Toolkit to perform the following tasks:

  • Generate new artifacts that adhere to a pattern.
  • Modify existing artifacts so they adhere to a pattern.

Implementing User Experience with Guidance Automation Toolkit

To meet the stated goals, you assemble a Guidance Package that consists of a number of recipes, wizards, and templates. The Guidance Package meets the scenario goals in the following ways:

  • Generating new artifacts that adhere to a pattern
  • Modifying existing artifacts so they adhere to a pattern

Generating New Artifacts That Adhere to a Pattern

You create one unbound recipe for each pattern that you want to include in the Guidance Package. Each recipe launches a wizard that prompts for a number of arguments, such as the number and names of each participant in the pattern (such as observers or subjects). Each recipe generates a number of classes that have code and relationships as defined by the pattern. The Guidance Package associates the recipes with context menus on classes or projects and with the Tools menu.

Modifying Existing Artifacts So They Adhere to a Pattern

The recipes you use are similar to those used for generating new artifacts, but you need to modify them to work with either new or existing participants. When the user of the recipe specifies pre-existing classes in the pattern, the recipe’s actions modify the classes by adding additional methods, properties, and fields so the class includes the structure and relationships as defined by the pattern. The Guidance Package associates the recipes with shortcut menus on classes or projects and with the Tools menu.

See also

Common Scenarios | Adding a User Experience to a Reusable Component | Adding a User Experience to an Application Framework | Packaging an Application Architecture as a Reusable Guidance