Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

How to: Create a Web Client Solution

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.

The Web Client Solution Templates unfold a Visual Studio solution you can use as a starting point for your Web client application. The solution includes recommended practices and techniques; it is the basis for the procedures and automated guidance included in the Web Client Software Factory.

Visual Studio 2010 supports two types of Web project models: the Web Site Project model and the Web Application project model. The software factory includes solution templates for both Web project modules.

This topic describes how to unfold a Web Client Solution template.

Prerequisites

The Web Client Solution template requires the following (included with the Web Client Software Factory):

Steps

The following procedure describes how to unfold the Web Client Solution template.

To unfold a Web Client Solution template

  1. In Visual Studio, point to New on the File menu, and then click Project.
  2. In the left pane of the New Project dialog box, expand Guidance Packages, and then click Web Client Software Factory 2010, as shown in Figure 1.

    Ff709850.ef5ea50c-5234-4707-81c9-c2d4f18d138a(en-us,PandP.10).png

    Figure 1

    The Web Client Solution project template
  3. In the Templates pane, select the template for the type of Web project model and development language that you want.
    Ff709850.note(en-us,PandP.10).gifNote:
    Note: This release of the Web Client Software Factory supports Web sites that use the Web Application project model. If you create your Web site as a Web Application project, you have the option to create business modules as sub-Web Application projects. Use the templates with the identifier “WAP” in the template name to create Web sites that use the Web Application project model. Use the templates with the identifier “Web Site” in the template name to create Web sites that use the Web Site Project model. For more information about Web Application projects, see Introduction to Web Application Projects.

  4. (Optional) Change the name of the solution in the Name box and the location of the solution in the Location box.
  5. Click OK.

    The Web Client Solution template references the Create Solution recipe. The Guidance Automation Extensions framework calls the recipe when it unfolds the template. The Create Solution recipe starts a wizard to gather information that it uses to customize the generated source code. Figure 2 illustrates the first page of the wizard.

    Ff709850.8a996d0f-a072-4ac3-872a-2c4c97b17896(en-us,PandP.10).png

    Figure 2

    The Create Web Solution recipe wizard
  6. (Optional) Modify the location of the Composite Web Application Block and Enterprise Library assemblies. The names of the required assemblies appear under Required application block assemblies. The default location is the Microsoft Practices Library folder of the Web Client Software Factory, in case it is installed. (The wizard validates that all required assemblies exist at the specified location; any required assemblies that are not at that location are displayed in red.)
  7. Enter the root namespace for your application. This value appears as the first part of every namespace in the generated solution.
  8. Click Finish. The recipe unfolds the Web Client Solution template.

Outcome

You will have a Web client solution you can use as starting point for building and testing your Web client application. The Web client solution includes a Web site with a business module named Shell. This module is associated with the root folder of the Web site. This means that all pages in the root Web site folder belong to the Shell module.

The Shell module registers the following global services:

  • SiteMapBuilderService. Business modules use this service to register site map nodes. The Shell module uses this service to register the Home site map node.
  • EnterpriseLibraryAuthorizationService. This service uses the Enterprise Library Security Application Block to provide authorization.

Figure 3 illustrates the solution structure of the Web client solution.

Ff709850.094ec572-2030-4479-a3bd-efaf310a5531(en-us,PandP.10).png

Figure 3

The Web client solution

The Web Client Solution template generates a functional Web site with a default home page. If you run the application, you will see Figure 4.


Ff709850.4fa90729-2776-4c8d-aeb4-ff6ba0fcdef0(en-us,PandP.10).png

Figure 4

The default home page of the Web Client Solution project

Next Steps

The following are typical tasks that you perform after you create a Web client solution:

  • Define visual styles. The Web Client Solution template includes an ASP.NET theme named Default. You can update this theme or create your own application-specific theme.
  • Create global Web pages. Frequently, a Web site contains global pages that are accessible to all users. For example, a page that displays Help information, a page that users use to log on to the site, or a page that displays error information. You can use the Add Page (with presenter) recipe to create these global views. For information about how to run the recipe, see How to: Add a Page with a Presenter.
  • Add business modules. Business modules are units of development and deployment that typically include a combination of related Web pages, page flows, business logic, and services. With modules, you can encapsulate a set of concerns of your application and deploy them together. The following are examples of business modules:
    • A module that contains a specific application feature area, such as reports
    • A module that contains use cases around a specific back-end system, such as loan processing

    To create a business module, run the Add Business Module recipe on a solution folder. For information about how to run the recipe, see How to: Create a Business Module.

  • Add foundational modules. Foundational modules encapsulate infrastructure services and do not contain Web pages. An example of a foundational module is a module that contains services for logging and authorization.

    To create a foundational module, run the Add Foundational Module recipe on a solution folder. For information about how to execute the recipe, see How to: Create a Foundational Module.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.