This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
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 because developers cannot get used to them.
The Web Client Software Factory includes a guidance package named Web Client Software Factory 2010 that helps architects and developers to quickly incorporate many of the proven patterns and practices of Web client development in their applications. 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 perform manually. For example, developers can use the Web Client Software Factory 2010 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 by automating repetitive tasks, reduce the number of errors that might occur when they perform tasks manually, easily incorporate proven patterns and practices into the application, and focus more of their efforts on implementing business requirements. Figure 1 shows some of the automated tasks provided by Web Client Software Factory 2010 Guidance Package.
Guidance Packages Overview
Architects use the Guidance Automation Toolkit to create a guidance package. After it is created, the architect distributes a VSIX file 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 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 task might 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.
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 a method to the class, or complex, such as the creation of a new project with classes that are added to the solution.
Many guidance packages include 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 2 illustrates a development computer that has multiple guidance packages. For example, the Web Client Software Factory 2010 Guidance Package contains four Visual Studio templates.
Guidance packages also include recipes. Recipes define a series of actions that a developer typically performs manually 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 3 illustrates the commands that appear when you right-click a solution folder.
Actions create or update solution artifacts. They do this by expanding a Visual Studio template or a Text Template Transformation Toolkit (T4) template. Figure 4 illustrates the relationship between a guidance package and the key components that it contains.
Guidance Package Manager
Developers can use the Guidance Package Manager to 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
- Using Visual Studio, open your solution.
- On the Tools menu, click Guidance Package Manager. Figure 5 illustrates the Guidance Package Manager in a solution that uses the Web Client Software Factory 2010 Package.
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.