Walkthrough: Defining Applications on Application Diagrams
This walkthrough guides you through defining and configuring reusable applications that you can use to design an application system in Visual Studio Team System Architecture Edition. You can later use these application definitions to design application systems. You can configure each use of an application definition within a system for deployment. 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 systems 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 http://go.microsoft.com/fwlink/?LinkId=40867.
To create a distributed system solution
Create a new Application Design solution and name it Catalog.sln. For more information, see How to: Create Application Diagrams.
When you create this solution, Application Designer opens and displays a blank application diagram named Catalog.ad.
You will now add an ASP.NET Web application definition to the diagram.
To add a Web application definition
From the Toolbox, drag an ASP.NETWebApplication to the application diagram.
The ASP.NETWebApplication application definition appears on the diagram and displays a Web content endpoint by default.
Click the application definition and press F4 to view the Properties window.
In the Properties window, change the Name property to SalesWebClient.
Click the Web content endpoint and name it SalesUI.
For more information, see How to: Define Applications on Application Diagrams.
You will now add a Windows application definition.
To add a Windows application definition
From the Toolbox, drag a WindowsApplication to the application diagram.
Place this application definition next to SalesWebClient.
Name the application definition SalesSmartClient.
You will now add an ASP.NET Web service application definition.
To add a Web service application definition
From the Toolbox, drag an ASP.NETWebService to the diagram and place it below SalesWebClient.
A .NET 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.
Name the Web service application Catalog.
Change the name of the Web service provider endpoint on Catalog to CatalogWebService.
You will now add an external database.
To add an external database
From the Toolbox, add an ExternalDatabase to the application diagram and place it below Catalog.
To add a database to the application diagram, use the Toolbox instead of Server Explorer or add it from the Diagram menu.
Name the database CatalogDB.
Visual Studio names the database endpoint with the same name. The database endpoint appears as a small hexagonal shape on the external database. The database endpoint makes it possible for you to connect other applications to the external database. You will configure the database connection string later in this walkthrough.
You will now specify communication pathways between application definitions by connecting them through their endpoints.
To connect application definitions
On the diagram, click SalesWebClient, and click Connect on the Diagram menu.
The Create Connection dialog box appears.
In the Application list under Connect to, select Catalog.
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 SalesWebClient. This Web service consumer endpoint displays Web service operations, which define Web methods that the application can consume. You can define operations at any time by using the Web Service Details window. After you implement the application, you can also define operations through code.
While pressing ALT, drag the CatalogWebService endpoint to SalesSmartClient to connect it.
For more information, see How to: Connect Applications on Application Diagrams.
Redraw connections as needed by selecting the connection and clicking Redraw Connection on 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
Connect Catalog to the CatalogDB endpoint on CatalogDB by using the same techniques described above.
The Choose Data Source dialog box appears.
Under Data Source, select Microsoft SQL Server and click Continue.
The Connection Properties dialog box appears.
Under Server name, enter the path to the SQL Server you want to use.
Under Log on to the server, choose the authentication you use on the specified server and if necessary provide the User name and Password.
Under Connect to a database, click Select or enter a database name and then specify your database.
Click Test Connection to ensure that you can access the database and then click OK.
This action creates a connection between Catalog and the database.
You can edit the connection string in the Properties window when you select the database consumer endpoint on Catalog.
Save the solution.
For more information, see How to: Configure Connections to External Databases.
The next step is to design an application system composed from the individual applications you just defined. To continue, see Walkthrough: Designing Application Systems by Using a Bottom-Up Approach.