Adding a User Experience to an Application Framework

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 have built a simple queuing framework that listens to messages arriving on request queues, passes them to business actions, and then sends messages returned by the business actions to response queues.

The framework has the following properties:

  • Its functionality spans multiple domains (for example, managing user dialog and communication with services).
  • Its functionality is applicable to multiple applications.
  • It imposes architectural constraints on applications that use the framework.
  • Its configuration file describes the queues and business actions used.
  • Its behavior can be customized through configuration.
  • It uses finer grained components that are configurable and extensible.

You want to add an integrated user experience that simplifies using the application framework. You also want to develop applications that use the framework.

Scenario Goals

You want to use the features of the Guidance Automation Toolkit to simplify the following processes:

  • Enabling the framework Guidance Packages in a solution
  • Starting a new solution that uses the framework
  • Creating solution elements that work within the constraints of the framework
  • Changing existing solution elements to work with the framework
  • Configuring the framework for common scenarios

Implementing a User Experience with the Guidance Automation Toolkit

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

  • Enabling the framework Guidance Packages in a solution
  • Starting a new application based on the application framework
  • Creating solution elements that use the framework
  • Changing existing solution elements to work with the framework
  • Configuring the application framework for common scenarios

Enabling the Framework Guidance Packages in a Solution

You create a binding recipe that creates unbound recipes and template references that will be visible in the solution. This recipe is executed when the Guidance Package is enabled with the Guidance Package Manager.

Starting a New Application Based on the Application Framework

You create a solution template that developers can use to start development with the framework. The solution includes a simple client that sends a message over a request queue and receives a response over a response queue, along with a simple business action that receives the message and returns a response.

The template has an associated recipe that executes when the template is unfolded. The recipe displays a wizard that gathers the following information:

  • Names and location of request and response queues
  • Location of framework DLLs
  • Location of the framework configuration file

When the template is unfolded, the Guidance Package is enabled, the binding recipe is executed, and then the associated recipe is executed. This provides the developer with a solution that includes recipes and templates. The developer can now use this working example to write other solution elements that use the framework.

Creating Solution Elements that Use the Framework

You create an unbound recipe that adds a business action to an existing code project. The recipe displays a wizard that gathers the following information:

  • Location of the framework configuration files
  • Action name

The recipe then adds references to framework assemblies and uses a template to generate an action class. This action class includes a method the framework can call to pass the request message and a method that calls the framework to send a response message. The recipe adds the class information to the framework configuration file and creates a bound reference to the action class. The developer can use the bound reference to associate the action with the request and response queues.

You also develop a project template that creates a new project for an action. You associate the unbound recipe with the template, so when the project is unfolded, a business action class is created in the project and is introduced to the framework. This allows the developer to create a new action in an existing project using an unbound recipe or to create a new project with an action class using the Add-New launch point.

Changing Existing Solution Elements to Work with the Framework

You create an unbound recipe that displays a wizard that prompts the developer for information about the framework files and the names of request and response queues. The recipe then adds framework assembly references to the project (if they are not there already), and adds two methods to existing C# classes. The first method is called by the framework to pass the request message, and the second method calls the framework to send the response message.

Configuring the Application Framework for Common Scenarios

You create three bound, recurring recipes associated with the framework configuration file. These recipes do the following:

  • They create a new entry in the configuration file, associating a user-friendly name used in the actions with a queue.
  • They change the existing queue name.
  • They remove a queue entry from the configuration file.

See also

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