Saturday, February 16, 2008

MS Visual Studio 2008 - New Features - System Designer

Visually Create Systems with VS.NET 2008 Architecture Edition

The new System Designer project (found in the New Project\Distributed Systems folder) allows developers and architects to, first, visually define and design an application system. Prior to System Designer, you only had the Application Design project, an application-scope-only designer, limiting you to defining and implementing applications, such ASP.NET, Windows Forms, Web Services, etc., in a visual way. The problem with the Application Design project, of course, is that it's application-scope-limited--it pertains to an application, or set of related applications, and not to an entire system or even a multitude of systems. Conceptually speaking, a system should comprise one or more applications/services, without having to define applications within an application project per se. The System Design project allows us to create systems and add to them inter-related applications and even sub-systems--a beneficial feature for us application designers and system architects.

The System Design project helps to facilitate visual system-design and implementation in VS.NET 2008 Architecture edition. To develop a System Design project, perform the test steps below:

  1. Startup VS.NET 2008 Architecture Edition.
  2. Click on File, New, then Project, or press Ctrl-Shift-N.
  3. Locate and select the Distributed Systems folder/node.
  4. Select System Design, then click on OK.


    You are now presented with two files/objects: a System diagram (*.sd) and an Application diagram (*.ad).
  5. Open up the Toolbox (or press Ctrl-Alt-X). You'll see a list of System Design and Application Design specific controls.
  6. This test system will consist of an ASP.NET Web Site, ASP.NET Web Service, and External Database, so drag and drop these application design types from the Toolbox onto the System Design (.sd) designer area.


    Adding applications to the System Designer area will result in those applications also being added to the Application Design (.ad) area.
  7. Select WebApplication1, then click on the Diagram menu, then on Rename.
  8. Name it ASPNETApplication, then click on OK.
  9. Select WebApplication2, then click on the Diagram menu, then on Rename.
  10. Name it ASPNETWebService, then click on OK.
  11. Select Database1, then click on the Diagram menu, then on Rename.
  12. Name it SQLServer2005, then click on OK.
  13. When you drag and drop applications onto the design area, default endpoints are automatically generated for each one. To ensure our system allows reusability via the ASP.NET Web Service (i.e., not only can the ASP.NET application leverage the web service, but so can a potential many other applications and services), the ASP.NET application will use this web service for all business logic and data tier services/functionality, so to define such a relationship logically and visually, we need to connect the applications/services accordingly. Endpoints are the means by which applications and services inter-communicate, so connections between them must be setup.
  14. We need to delete the useless Web Content Endpoint for the ASPNETApplication web application, so select the WebContent1 endpoint, then press Delete.
  15. Since the ASPNETApplication application will be consuming the ASPNETWebService web service, we need to create a Web Service Consumer Endpoint on it. This endpoint is created automatically when a connection is made between the ASPNETApplication application and the ASPNETWebService web service. Right-click on the ASPNETApplication application, then click on Connect.
  16. In the Connect To area, ensure that the Application is ASPNETWebService and that the endpoint is WebService1.
  17. Click on OK.
  18. Now let's connect the ASPNETWebService to SQLServer2005 database. Right-click on the ASPNETWebService web service application, then click on Connect.
  19. Ensure that the Connect To Member is SQLServer2005 and that the Connect To Endpoint is SQLServer2005.
  20. Click on OK.
  21. In the Choose Data Source dialog box, in the Data Source drop-down list, select Microsoft SQL Server, then click on Continue.
  22. In the Connection Properties dialog box, specify all relevant SQL Server information. This is the SQL Server that the ASPNETWebService web service will connect it.
  23. Click on OK. The endpoint connections should now look like the following:

No comments: