Walkthrough: Defining ApplicationsĀ 

This walkthrough guides you through defining and configuring reusable applications that you can use to design an application system. Application systems are composed from application definitions created in Application Designer. Within the system, each use of an application definition can be configured differently, as needed. Subsequent walkthroughs demonstrate how to design an application system and evaluate the deployment of that system against a logical representation of a datacenter.

In this walkthrough, you will complete the following tasks:

  • Create a distributed system solution that contains a blank application diagram.

  • Add application definitions and a database reference to the application diagram.

  • Specify communication pathways between application definitions by connecting them through their endpoints.

A sample that demonstrates the outcome of this walkthrough is available on the Microsoft Download Center at https://go.microsoft.com/fwlink/?LinkId=40867.

To create a distributed system solution

The next step is to add an ASP.NET Web application definition to the diagram.

To add a Web application definition

  1. From the Toolbox, drag the ASP.NETWebApplication prototype to the application diagram.

    The ASP.NETWebApplication application definition appears selected on the diagram and displays a Web content endpoint by default.

  2. Press F4 to view the Properties window.

  3. In the Properties window, change the Name property to "SalesWebClient".

  4. Select the Web content endpoint and name it "SalesUI".

For more information, see How to: Define Applications on Application Diagrams.

Next, you will add a Windows application definition.

To add a Windows application definition

  1. From the Toolbox, drag a WindowsApplication to the application diagram.

  2. Place this application definition adjacent to the SalesWebClient you created previously.

  3. Name the application definition "SalesSmartClient".

The next step is to add an ASP.NET Web service application definition.

To add a Web service application definition

  1. From the Toolbox, drag the ASP.NETWebService prototype to the diagram and position it below SalesWebClient.

    A Web service provider endpoint appears as a small circular shape on the border of the application definition. You will use the Web Service Details window to define Web service operations on this endpoint in Walkthrough: Designing a Web Service. For more information about adding operations, see Defining Operations for ASP.NET Web Services.

  2. Name the Web service application "Catalog".

  3. Select the Web service provider endpoint on Catalog and change the Name property of the endpoint to "CatalogWebService".

The next step is to add an external database.

To add an external database

  1. From the Toolbox, add the ExternalDatabase prototype to the application diagram and position it below Catalog.

  2. Name the database "CatalogDB". The database endpoint automatically takes the same name.

    Note

    To add a database to the application diagram, use the Toolbox instead of Server Explorer or add it from the Diagram menu.

    The database endpoint appears as a small hexagonal shape on the border of the application definition. The database endpoint makes it possible for other applications to connect to the external database. You will configure the database connection string later in this walkthrough.

The next step is to specify communication pathways between application definitions by connecting them through their endpoints.

To connect application definitions

  1. On the diagram, select SalesWebClient, and choose Connect from the Diagram menu.

    The Create Connection dialog box appears.

  2. In the Application list under Connect to, select Catalog.

  3. In the Endpoint list, select CatalogWebService, and click OK.

    A connection between SalesWebClient and Catalog appears.

    A consumer endpoint appears as a small hollow shape on the border of SalesWebClient. This Web service consumer endpoint displays Web service operations, which define Web methods that the application can consume. Operations can be defined at any time using the Web Service Details window. After the application is implemented, you can also define operations through code.

  4. While pressing ALT, click on the CatalogWebService endpoint and drag to connect it to SalesSmartClient.

    For more information, see How to: Connect Applications on Application Diagrams.

  5. Redraw connections as needed, by selecting the connection and choosing Redraw from the Diagram menu.

When you connect application definitions on the application diagram, you are specifying communication pathways between applications. For more information, see Defining Communication Pathways on Application Diagrams.

The final step is to configure the database connection string. To finish this procedure, you will need access to a database.

To create the database connection string

  1. Connect Catalog to the CatalogDB endpoint on CatalogDB using the same techniques described above.

    The Choose Data Source dialog box appears.

  2. Under Data Source, select Microsoft SQL Server and click Continue.

    The Connection Properties dialog box appears.

  3. Under Server name, enter the path to the SQL Server you want to use.

  4. Under Log on to the server, choose the authentication you use on the specified server and if necessary provide the User name and Password.

  5. Under Connect to a database, choose the Select or enter a database name option and then specify your database.

  6. Click Test Connection to ensure that the database is accessible and then click OK.

    A connection between Catalog and the database is created.

    Note

    You can edit the connection string in the Properties window when the database consumer endpoint on Catalog is selected.

  7. Save the solution.

For more information, see How to: Configure Connections to External Databases.

Next Steps

The next step is to design an application system composed from the individual applications you just defined. To continue, see Walkthrough: Designing Application Systems.

See Also

Concepts

Workflow Across Distributed System Designers

Other Resources

Introductory Distributed System Designer Walkthroughs