Share via


How to: Create an SDM System

How to: Create an SDM System

In SDM, systems represent objects that perform well-defined tasks. Systems are objects that model computer components such as applications, logical servers, and databases. Interaction between systems must be explicitly modeled using communication relationships. In the design surface (Application Diagram or Logical Datacenter Diagram) of an SDM project, a system appears as a rectangle that can contain endpoints and resources. Examples of systems include operating systems, Web applications, Internet Information Servers, databases, and SQL Servers.

When to Create an SDM System

Each component object of the system definition model has certain characteristics that serve as guidelines in deciding how to define a model for it. You should model an object as a system when:

  • The object you are modeling is a stand-alone solution.
  • The object you are modeling can be deployed separately from other objects.
  • To function, the object you are modeling only needs a host and to participate in zero or more communication relationships with other objects.

A logical server system object and an application system object both fit the criteria above. An application system models an application and a logical server system models a logical server. The sections below show how to create them.

  1. Create an application system or a logical server system. For information on how to create each system, see How to: Create an SDM Logical Server System and How to: Create an SDM Application System.

  2. Install the prototype for the system.

    Each prototype (.adPrototype and .lddPrototype) that you create for a system must be installed in a folder where Visual Studio can find them. In Visual Studio 2005, Visual Studio will scan for all files with the extensions .adPrototype and .lddPrototype in the directories found in the registry key:

    HKLM\Software\Microsoft\VisualStudio\
         8.0\EnterpriseTools\DesignerPrototypeFolders

    In Visual Studio 2005, use the following procedure to install the prototype for the system:

    1. Create a new registry value (string value) under the prototype folders key.
    2. Set the registry value's Name to something that will be unique such as the name of the .sdm file that contains your system or a guid value.
    3. Set the registry value's data to the folder in which your prototypes are found.

    In Visual Studio Team System 2008 Architecture Edition, use the following procedure to install the prototype for the system:

    1. Right-click anywhere in the Visual Studio Toolbox, and click Import.

    2. In the Import Prototype from File dialog box, click the ellipsis (…) button next to the Prototype Filename box.

    3. In the Select Prototype File dialog box, browse to and double-click the prototype file that you want to install.

    4. Under Import for Users, choose one of the following:

      • To import the prototype for your use only, click Import for my use only and then click OK.
      • To import the prototype for all users on your computer, click Import for all users of this computer, and then click OK.

    Note  If you are running Visual Studio on Windows Server 2003 or Windows XP, you must have at least Power User permissions to import for all users. If you are running Visual Studio on Windows Vista, you must have administrator permissions to import for all users.

    To create an .msi file for installing the prototype, you need the following registry keys:

    • To install the prototype for an individual user, use the following registry key:

      HKCU\Software\Microsoft\VisualStudio\
           9.0\EnterpriseTools\DesignerPrototypeFolders

    • To install the prototype for all users on the same computer, use the following registry key:

      HKLM\Software\Microsoft\VisualStudio\
           9.0\EnterpriseTools\DesignerPrototypeFolders

    The next time Visual Studio is started, your prototype will appear in the toolbox.

  3. Install a bitmap for the prototype (optional).

    The bitmap that is displayed next to a prototype in the Visual Studio 2005 toolbox is a 16x16 pixel .bmp file. When the prototype is created using the SDM Prototype Generator (ProtoGen.exe) tool, a default bitmap file will be assigned to it. If you want custom bitmaps to be created with a prototype, you need to specify the location of the bitmap in the arguments to the SDM Prototype Generator (ProtoGen.exe) tool.

  4. Setup Visual Studio to use the newly created system.

    After an SDK user has compiled (validated) a .sdm file (containing the system) to create a .sdmdocument, the .sdmdocument file needs to be installed so that it is visible on the design surface in Visual Studio. Visual Studio loads a number of models (compiled .sdmdocument files) when a distributed system application is opened or created. To instruct Visual Studio to load your model during startup, you need to add the full path to your model in a registry key. In Visual Studio 2005, the registry key is:

    HKLM\Software\Microsoft\VisualStudio\
         8.0\EnterpriseTools\Sdm\InitializationFiles

    In Visual Studio Team System 2008 Architecture Edition, the registry key is:

    HKLM\Software\Microsoft\VisualStudio\
         9.0\EnterpriseTools\Sdm\InitializationFiles

    There is one entry per model that needs to be loaded during startup. Consider the following when adding a value to this key for your model.

    • Add one value for each model you are installing.
    • The name of the value is typically the name of the .sdmdocument file without the .sdmdocument extension. The registry data value is the full path to your model. For example, an entry for the application system that is created from the How to: Create an SDM Application System topic would be: Microsoft.Samples.MyApplication = C:\SdmSamples\Microsoft.Samples.MyApplication.sdmdocument.
    • The name of the registry value determines the order in which the models are loaded. The models get loaded alphabetically from the registry key according to the name. For your model to be loaded correctly, all models imported by your model must be loaded before your model. To guarantee loading in the correct order, the recommendation is: add a numerical prefix to the name of your file. The prefix must be greater than the numbers of the models that your model imports. If your model doesn't import any documents, you should still use a number for consistency.

See Also

How to: Create a .sdmdocument File
How to: Create an SDM Resource
How to: Create an SDM Endpoint
How to: Create an SDM Logical Server System
How to: Create an SDM Application System

Send comments about this topic to Microsoft

Build date: 10/2/2007