New in This Guidance Bundle | Preparing Visual Studio for Automated Guidance | Recipes and templates documentation | How-to topics

Guidance Automation

Architects and developers identify and discover proven practices and patterns through application development. Alternatively, development teams can investigate and attempt to identify proven practices and patterns before starting the application development project. Typically, it is difficult to transmit the proven patterns and practices to other developers in the team or company, either because they are hard to implement, they are difficult to understand, or simply because developers do not get easily used to them.
This bundle includes a guidance package named Web Client Development that helps architects and developers to quickly incorporate many of the proven patterns and practices of Web client development. A guidance package consists of templates and automated tasks (named “recipes”) that you can run in Visual Studio to perform a series of development activities following proven patterns and practices—activities that developers usually have to manually perform. For example, developers can use WebClient Development Guidance Package to create an initial solution structure that includes a Web site, a foundational module, and required references to the Composite Web Application Block and Enterprise Library assemblies. By adding automation to the development process, developers can save time in repetitive tasks, reduce the number of errors that might occur when manually performing the tasks, easily incorporate proven patterns and practices into the application, and they can focus more of their efforts on implementing business requirements. Figure 1 shows some of the automated tasks provided by Web Client Development Guidance Package.
Figure 1
Guidance packages include automated tasks that developers can run from Visual Studio.

Guidance Packages Overview

Architects use the Guidance Automation Toolkit to create a guidance package. After it is created, the architect distributes a Microsoft Windows Installer that contains the guidance package. Developers install the guidance package on development computers that have the required run-time component Guidance Automation Extensions. After a guidance package is installed and enabled for a particular solution, the developer executes recipes to perform the required tasks. These tasks affect the structure and source code of the active solution. For example, a particular task may add a project to the solution and create three classes in that project. The developer adds customizations and additional business logic to the solution. During development, the developer can use the guidance package to perform other tasks. The developer builds the application and distributes it to the end users. Figure 2 illustrates how a guidance package is created and used across the development life cycle.
Figure 2
Guidance life cycle.

Key Concepts

A guidance package extends Visual Studio and offers guidance to developers as they develop applications. Developers activate the guidance through gestures in Visual Studio. For example, a developer can right-click a class in Solution Explorer and then click a guidance package menu item. When the developer clicks the menu item, the package executes a series of tasks. The results of the task can be simple, such as the addition of method to the class, or complex, such as the creation of new project with classes that are added to the solution.
A guidance package often includes Visual Studio templates. When a developer installs a guidance package that includes a Visual Studio template, the template will appear in the New Project dialog box of Visual Studio. Each guidance package that includes a Visual Studio template appears under the project type category named Guidance Packages. Figure 3 illustrates a development computer that has two guidance packages, each of which contains at least one Visual Studio template: Web Client Development and Guidance Package Development. The Web Client Development Guidance Package contains four Visual Studio templates.
Figure 3
Guidance packages with solution templates in the Visual Studio New Project dialog box.

Guidance packages also include recipes. Recipes define a series of actions that a developer typically manually performs in Visual Studio. The actions are activities that create or transform solution artifacts. A developer can use a recipe to automate these actions. Recipes appear in the Visual Studio interface as commands. Recipes can be run on particular solution elements or on a group of solution elements that share certain characteristics (for example, all C# projects). Figure 4 illustrates the commands that appear when you right-click a solution folder.
Figure 4
Add Business Module recipe and Add Foundational Module recipe menu items.

Actions create or update solution artifacts; they do this by expanding a Visual Studio template or a T4 template. Figure 5 illustrates the relationship between a guidance package and the key components it contains.
Figure 5
Key components of a guidance package.

Guidance Package Manager

Using the Guidance Package Manager, developers perform a variety of operations on guidance packages, recipes, and Visual Studio templates.

The following procedure assumes that you have the Guidance Automation Extensions installed.

To view the Guidance Package Manager
  1. Using Visual Studio, open your solution.
  2. On the Tools menu, click Guidance Package Manager. Figure 6 illustrates the Guidance Package Manager in a solution that uses the Web Client Development Package.
Figure 6
Guidance Package Manager.

The following user operations are supported from the Guidance Package Manager:
  • Viewing installed guidance packages. Information about installed guidance packages is stored in the framework manifest file. The Guidance Package Manager inspects the file and shows the user the available guidance packages.
  • Inspecting content of a guidance package. When the Guidance Package Manager is asked to inspect a guidance package, it reads the configuration file of the guidance package and inspects the guidance package directory. Based on this information, the Guidance Package Manager shows the user a list of guidance package recipes and templates. The user can inspect both enabled and disabled guidance packages.
  • Enabling a guidance package. After a guidance package is installed, it must be enabled before its recipes and templates can be used inside a Visual Studio solution. The developer can enable a package from the Guidance Package Manager.
  • Disabling a guidance package. This is the opposite of enabling a guidance package. Disabling a guidance package does not uninstall it.
  • Viewing solution recipes and templates. The Guidance Package Manager communicates with the recipe framework foundation and shows all recipe references and template references currently associated with the solution.
  • Executing a recipe. The developer can select a recipe reference and execute its recipe directly from the Guidance Package Manager. Templates cannot be executed from the Guidance Package Manager; they have to be executed from the Add New Project dialog box or the Add New Item dialog box.
  • Deleting a recipe reference. The developer can delete a recipe reference. To do this, select the recipe reference, and then click Delete.
New in This Guidance Bundle | Preparing Visual Studio for Automated Guidance | Recipes and templates documentation | How-to topics

Last edited Nov 12, 2007 at 1:52 PM by siacomuzzi, version 3


No comments yet.