Getting Started with the Smart Client Software Factory

 

Patterns and Practices home

patterns & practices Developer Center

Shop for patterns and practices books online

June 2006

Summary

Are you new to the Smart Client Software Factory? This topic provides a set of helpful links to get you started.

Contents

What Is the Smart Client Software Factory?
Installing the Smart Client Software Factory
Exploring and Evaluating the Smart Client Software Factory
Customizing the Smart Client Software Factory

What Is the Smart Client Software Factory?

The Smart Client Software Factory is an integrated collection of tools, patterns, source code, and prescriptive instructions that guide developers throughout the development process. It exposes recommended practices for smart client development through the following elements (illustrated in Figure 1):

  • How-to topics. These are documented step-by-step instructions that describe how to implement recommended practices.
  • Patterns. These are documented solutions to common architectural, design, and implementation challenges.
  • Reference implementation. This is an end-to-end, executable sample application that demonstrates the smart client guidance in action.
  • Guidance package. This is an extension to Visual Studio that automates development activities that developers would usually have to manually perform, frequently by following a series of instructions.

For a detailed description of the software factory see the Smart Client Software Factory home page.

Installing the Smart Client Software Factory

The Smart Client Software Factory contains a variety of software assets, such as reusable code components, documentation, reference implementations, and tools, including wizards, code generators, and visual designers. If you want to use all the assets in the Smart Client Software Factory, you must install the Composite User Interface Application Block, Enterprise Library, Guidance Automation Extensions, and Guidance Automation Toolkit.

Note: Not all assets in the software factory require the full set of prerequisites. To become familiar with the assets in the Smart Client Software Factory, see Exploring and Evaluating the Smart Client Software Factory.

Summary of Installation Steps

Use the following steps to install the Smart Client Software Factory and its prerequisites:

Note: If you are in the evaluation stage, and you only want to review the documentation and source code, proceed to step 5.

  1. Install the Composite User Interface (UI) Application Block assemblies
  2. Install the Enterprise Library Assemblies
  3. Install the Guidance Automation Extensions
  4. Install the Guidance Automation Toolkit
  5. Install the Smart Client Software Factory

Install the Composite User Interface (UI) Application Block Assemblies

The reference implementations and Smart Client Development guidance package require the Composite UI Application Block assemblies. You must compile the application block and copy the assemblies to the Lib folder of the Smart Client Software Factory installation directory.

Note: If you have installed and compiled the Composite UI Application Block, you can skip this step. The Windows Installer for the Smart Client Software Factory will copy the Composite UI Application Block assemblies to the Lib folder.

To install the required assemblies

  1. Download and install the C# version of the Composite UI Application Block (December 2005).
  2. Open the solution file (CompositeUI.sln) and build the solution.
  3. Copy the following assemblies from the build output folder to the Lib folder of the Smart Client Software Factory installation directory:
    • Microsoft.Practices.CompositeUI.dll
    • Microsoft.Practices.CompositeUI.WinForms.dll
    • Microsoft.Practices.ObjectBuilder.dll

Install the Enterprise Library Assemblies

The reference implementations and the Smart Client Application solution template in the guidance package use application blocks from Enterprise Library. You must compile Enterprise Library and copy the required assemblies to the Lib folder of the Smart Client Software Factory installation directory.

Note: If you have installed and compiled Enterprise Library, you can skip this step. The Windows Installer for the Smart Client Software Factory will copy the required assemblies to the Lib folder.

To install the required assemblies

  1. Download and install the Enterprise Library for .NET Framework 2.0 – January 2006.
  2. When you install the Enterprise Library, the installation program creates a menu item labeled Build Enterprise Library on the Start menu. Click this menu item to compile a debug version of the application blocks and tools. The installation program also creates a menu item labeled Copy Assemblies to bin folder on the Start menu. Click this menu item to copy the resulting assemblies to the bin directory.
  3. Copy the following assemblies from the Enterprise Library bin folder to the Lib folder of the Smart Client Software Factory installation directory:
    • Microsoft.Practices.EnterpriseLibrary.Caching.dll
    • Microsoft.Practices.EnterpriseLibrary.Common.dll
    • Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
    • Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
    • Microsoft.Practices.EnterpriseLibrary.Logging.dll
    • Microsoft.Practices.EnterpriseLibrary.Security.dll

Install the Guidance Automation Extensions

Download and install the Guidance Automation Extensions (June 2006) CTP Release.

Note: The Guidance Automation Extensions is required to run the recipes in the guidance package. A guidance package is an extension to Visual Studio that automates development activities that developers would usually have to manually perform, frequently by following a series of instructions.

Install the Guidance Automation Toolkit

Download and install the Guidance Automation Toolkit (June 2006) CTP Release.

Note: The Guidance Automation Toolkit is required only if you want to customize the Smart Client Software Factory.

Install the Smart Client Software Factory

Download and install the Smart Client Software Factory – June 2006.

Note: The Windows Installer installs all the Smart Client Software Factory assets. If you want to review only the documentation and source code, you can install only the reference implementation source code and the documentation.

Exploring and Evaluating the Smart Client Software Factory

Table 1 lists suggested resources to help you explore the benefits of using the software factory to create smart client applications.

Table 1: Resources for Evaluating the Software Factory

If you want to... Explore...
Learn patterns of smart client development Useful Patterns for Smart Client Applications
Explore the common developer tasks Developing Smart Client Applications
See the guidance implemented in source code Exploring the Reference Implementations
Explore the automated developer tasks Exploring the Automated Developer Tasks
Customize the software factory Customizing the Smart Client Software Factory

Useful Patterns for Smart Client Applications

The factory documentation introduces the following patterns that provide solutions to common smart client design, implementation, or deployment challenges:

  • Model-View-Presenter (MVP)
  • Asynchronous Web Service Invocation with Timeout
  • Service Agent Proxy API Separation
  • Container Hierarchy
  • View Navigation
  • Workspace Hierarchy
  • UI Threading
  • Module Plug-in
  • Action Catalog
  • Service Locator
  • WorkItem Identity Publication
  • Module Interface Separation

For a description of each of these patterns, see "Useful Patterns for Smart Client Applications" in the Smart Client Software Factory documentation.

Developing Smart Client Applications

This documentation describes activities that developers perform when creating smart client applications. You can use the Smart Client Development guidance package to automate many of the activities described in these topics. Some of the topics describe how to complete isolated tasks using sequential, manual procedures. The following topics describe the common development activities:

  • How to: Create Smart Client Solutions
  • How to: Create Modules
  • How to: Add View with Presenter
  • How to: Create Smart Web References
  • How to: Map Business Entities into User Interface Elements
  • How to: Publish Events and Subscribe to Events
  • How to: Communicate Between Views
  • How to: Translate Between Business Entities and Service Entities
  • How to: Use Action Catalogs

Figure 1 illustrates common developer activities as they relate to each other and to available guidance in the software factory.

Figure 1. Smart Client Software Factory development activities

Exploring the Reference Implementations

The Smart Client Software Factory includes two reference implementations, the Appraiser Workbench and the Branch Client. The reference implementations are executable sample applications that demonstrate the smart client guidance in action. You can use the reference implementations to see a realistic scenario that incorporates the toolkit guidance.

The software factory includes the source code for the reference implementations. This means you can copy the source code for the implementation of any particular guidance into your applications. However, the recommended approach for incorporating reusable source code into your application is to use the guidance package. The guidance package provides you with recipes and templates that generate the most commonly used code.

The Smart Client Software Factory documentation contains a full description of the reference implementations, including architectural views and application features.

To prepare and run the reference implementations

  1. Download, install, and compile the C# version of the Composite UI Application Block (December 2005).

  2. Copy the following assemblies from the build output directory to the Lib folder of the Smart Client Software Factory:

    • Microsoft.Practices.CompositeUI.dll
    • Microsoft.Practices.CompositeUI.WinForms.dll
    • Microsoft.Practices.ObjectBuilder.dll
  3. Download, install, and compile Enterprise Library (January 2006).

  4. Copy the following assemblies from the build output directory to the Lib folder of the Smart Client Software Factory:

    • Microsoft.Practices.EnterpriseLibrary.Caching.dll
    • Microsoft.Practices.EnterpriseLibrary.Common.dll
    • Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
    • Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
    • Microsoft.Practices.EnterpriseLibrary.Logging.dll
    • Microsoft.Practices.EnterpriseLibrary.Security.dll
  5. Download and install the Smart Client Software Factory (June 2006).

  6. In Visual Studio, open the patterns & practices Appraiser Workbench solution (AppraiserWorkbench.sln) or Branch Client solution (BankBranchWorkbench.sln) from the Smart Client Software Factory.

    Note: The Branch Client reference implementation requires the Global Bank SQL database.

    To create this database in SQL Server 2005 Express Edition, execute the following command:

    OSQL -S (local)\SQLEXPRESS -E -i GlobalBank.sql

  7. Build and run the solution.

Exploring the Automated Developer Tasks

The Smart Client Software Factory includes the guidance package named Smart Client Application Development. You can use the Smart Client Development guidance package to automate smart client development activities that you would otherwise have to manually perform. It includes recipes and templates to generate Visual Studio artifacts such as projects, classes, and code. These artifacts are consistent with the guidance contained in the Smart Client Software Factory.

Table 1 lists the templates and recipes included in the Smart Client Development guidance package.

Table 2: Guidance Package Templates and Recipes

Item Description
Smart Client Application A solution template you can use as the starting point for your smart client application.
Add Business Module A project template that creates a starting point for a Composite UI Application module with a WorkItem.
Add Foundational Module A project template that creates a starting point for a Composite UI Application module that exposes services to WorkItems in other modules.
Add View (with presenter) A recipe that creates a view and an associated presenter.
Add Smart Web Reference A recipe that creates classes and commands you can use to invoke a Web service asynchronously with time-out.
Add Event Publication A recipe that defines an event topic and adds code to an existing class to declare and publish the event.
Add Event Subscription A recipe that adds a method to an existing class to subscribe to a specified event topic.

The guidance package is available as source code. If you do not select the option to register the guidance package when you install the software factory, you must compile the guidance package before you can install it.

Customizing the Smart Client Software Factory

The Smart Client Software Factory contains assets that represent recommended practices for smart client development. The software factory has been developed as a result of analyzing common enterprise development challenges and successful solutions to these challenges. Developers can use an unmodified version of the software factory to create smart client applications. However, because each application is unique, you should analyze whether the Smart Client Software Factory is suitable for your particular needs. In many cases, you will want to customize the Smart Client Software Factory to incorporate your enterprise's best practices and frequently repeated developer tasks.

Note: If you want to customize the Smart Client Software Factory, you will need to download and install the Guidance Automation Extensions (June 2006) CTP Release and the Guidance Automation Toolkit (June 2006) CTP Release.

More Information

For access to other documentation and resources, or to provide feedback, see the Smart Client Software Factory Web site. For more general information about the goals of this and other patterns & practices deliverables, see the patterns & practices Web site.

Patterns and Practices home