Inside Microsoft Blueprints
Michael G. Lehman, Senior Architect
Summary: This article covers the basics of Blueprint organization, the experience of using a Blueprint, and the fundamentals of authoring a Blueprint. (7 printed pages)
What Is Inside a Blueprint?
- Process guidance—Activities that the user should perform
- Workflows that provide instructions on how to build the deliverable that is targeted by the Blueprint
- Links to Web resources such as the Microsoft Developer Network (MSDN), CodePlex, blogs, Help content, and so on
- Readable resources—Resources that are consumed by humans
- Files such as Microsoft Office Word documents, Office PowerPoint presentations, videos, and screencasts
- Executable resources—Resources that are consumed by software
- Source code in various forms, such as code snippets, item/project templates, and T4 code-generation templates
- Domain-Specific Languages (DSLs)
- Other kinds of tools
- Blueprints Manager extensions that are launched either from an activity or via context menus that the Blueprint author makes available on items in the solution
Blueprints are delivered in one of three ways:
- Stand-alone Web sites that are viewed with any standards-compliant browser.
- Blueprint packages that are delivered inside of Microsoft Visual Studio by using the Blueprints Manager (BPM).
- Blueprint packages that are delivered via the Blueprints
- The BPE is a stand-alone Windows client application that also supports a local repository and RSS-based update, and that comes in End-User and Authoring editions.
To use Blueprints packages inside of Visual Studio, you use the Microsoft Blueprints Manager (BPM).
The BPM is a small Visual Studio extension (VSX) package that:
- Manages a client-side repository of Blueprint content (fully functional offline).
- Downloads and/or imports Blueprints into the repository.
- Provides facilities for unfolding Blueprints into a Visual Studio solution.
- Enables the consumption and management of process guidance.
- Exposes—via links in guidance and items on context menus—any tools that are contained within the unfolded Blueprints.
The BPM is delivered as a small .msi file that must be installed to use Blueprints. After installation, the BPM manages the download and storage of Blueprints packages into the repository—in most cases, without requiring additional installations. (Note: DSL tools and other VSX packages might require an .msi-based installation.)
Blueprints can be downloaded via RSS feeds by using the BPM, or imported from a Blueprint package (.zip) file that is stored on the local file system. Third parties also can create Blueprints and deliver them via their own RSS feeds (see the Building Blueprints section). The BPM will remind you, as appropriate, when updated Blueprints might be available from the feeds to which you are subscribed when you open a solution that contains one or more Blueprints.
Using the Blueprints Manager
Use of a Blueprint within Visual Studio is straightforward.
1. Open the Blueprints Manager by clicking Tools and then Blueprints Manager.
2. Select a Blueprint that you want to unfold into your solution. When you click on the name of a Blueprint, you can see the Overview that describes the content and purpose of that Blueprint in the details pane.
3. Click Unfold. The Blueprints Manager adds, as appropriate, additional projects to your solution and opens the Blueprints Process Guidance Browser, which is a dockable tool window.
4. Browse the process guidance. Then, as instructed, click on links in the details pane, or right-click on items in the Blueprint project and select items from the Blueprints menu.
Consuming Process Guidance
Blueprints deliver workflows, which are collections of related instructions and information that guide the user through the activities that are required to build the type of deliverable that is specified by the author of the Blueprint.
Each workflow is separated into three distinct elements:
- Overview—An introduction to the specific deliverable type that is targeted by this Blueprint.
- Workflow—A series of one or more, potentially parallel, activities that are to be performed. This can include information about which activities can be performed, given the current state of the Blueprint within the solution. Filtering lets the user see subsets—including completed, enabled, and blocked activities. Blocked activities also provide information with regard to what must be done to unblock them.
For example, the Blueprint author might specify that the user must choose delivery storage platforms before choosing a UX technology; that is, choosing Microsoft Windows Mobile and Microsoft SQL Server CE would allow the user to choose Microsoft .NET Compact Framework, but not Windows Presentation Foundation (WPF).
- Details—When authoring each activity, the Blueprint author can create detailed documentation or link to a URL that provides details.
For example, one activity might include some example code, while another might point to an appropriate download on MSDN or a Wiki that is behind an enterprise firewall. The Blueprint author also can include “command links” in the detailed documentation; these invoke custom tools that are within Visual Studio or inform the user that specific context-menu items are available directly within the solution.
To see an example of the Blueprints Manager in action, visit the Microsoft Blueprints landing page at http://channel9.msdn.com/blueprints, and watch the screencasts. Also, visit the Blueprints site on MSDN at http://msdn.microsoft.com/architecture/blueprints.
In addition to providing the Blueprints Manager as a freely available download, Microsoft also is providing the Microsoft Blueprints Factory (MBF), so that you can build your own Blueprints.
The MBF is delivered as a Blueprint, which allows it to provide the process guidance and resources that are required to automate much of the construction process.
To use the MBF, you must have installed the following prerequisites:
- Microsoft Visual Studio 2008 (RTM or SP1)
- Microsoft Blueprints Manager
Before You Build
Before you build a Blueprint, it is useful to understand the installation experience for each of the five levels of Blueprint complexity:
- Level 100—Noncode resources + process guidance
- Contains only noncode resources (such as Office Word documents and Office PowerPoint presentations).
- Might contain complex workflow.
- Does not create a project within the user’s solution.
- Level 200—Code resources + process guidance
- Adds item templates and project templates, but not automatic code generation.
- Level 300—Built-in commands and/or custom commands
- Command links in process guidance and/or context menus in the solution that can invoke automation
- Automation might be simply BPM built-in commands (for example, Open File in Office Word) or custom commands that are supplied via .NET Framework assemblies that are called BPM Extensions (for example, Add Folder to Office Outlook)
- Level 400—Solution templates
- Adds items to the File à New à Project dialog box in Visual Studio.
- Requires a restart of Visual Studio after installation.
- Level 500—Beyond commands: VSX packages and DSL tools
- Adds custom functionality to Visual Studio beyond that which is supported by the BPM.
- Might require the running of an .msi-based installation package.
- Might require a restart of Visual Studio after installation
- Might require administrative rights
Levels 100, 200, and 300 require neither administrative rights nor a restart of Visual Studio.
Here is a short walkthrough of how to build a Level 100 Blueprint. Full details on how to build Level 200, 300, 400, and 500 Blueprints are included in the guidance that is supplied with the Blueprints Factory.
Level 100—Noncode Resources + Process Guidance
1. Unfold the Blueprints Factory:
- Open Visual Studio.
- Click File, New, and then Project.
- Under the Blueprints node in the Visual C# tree, select the Blueprints Factory.
- Enter a name for your Blueprint in the Project Name dialog box. An instance of the Blueprints Factory project will appear in your solution.
- Make the edits that you want to make in the Name and Description fields of Blueprints Configuration Editor (text that appears to the user in the Blueprints Manager dialog box).
2. Edit the guidance and add content:
- Close the Blueprints Configuration dialog box. Then, open the Workflow dialog box by right-clicking on your Blueprint Factory project and selecting Edit Workflow from the Blueprints context menu.
- Add any noncode resources to the appropriate directories (such as demos, docs, media, samples, and so on).
3. Build and test your Blueprint:
- Build your Blueprint by selecting Build Blueprint from the Blueprints context menu. This will package all of the content and guidance, and install your new Blueprint into your local repository.
- Reopen the Blueprints Manager by clicking Tools and Blueprints Manager. Then, click on the name of your Blueprint, and click Unfold to expand it into your solution. The content files and workflow now should be available for you to double-check.
- If you want to edit your content and/or guidance, right-click on the unfolded Blueprint, select the Remove command from the context menu, and then go back to step 2.
Microsoft Blueprints provide powerful tools for helping developers, architects, and designers deliver results. Download the Blueprints Manager today from http://www.codeplex.com/blueprints. Find out more and keep up-to-date on the latest developments at http://msdn.microsoft.com/architecture/blueprints.