.NET
  Home arrow .NET arrow Page 11 - Examining the UML Models: Static Models
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Examining the UML Models: Static Models
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 11
    2005-04-20

    Table of Contents:
  • Examining the UML Models: Static Models
  • Classes
  • EXERCISE 5-4
  • EXERCISE 5-7
  • Relationships
  • Generalization Relationship
  • States
  • Components
  • Dependencies
  • Code Generation from a Component Diagram
  • Nodes
  • Stereotypes
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Examining the UML Models: Static Models - Nodes


    (Page 11 of 13 )

    Nodes in deployment diagrams represent hardware components capable of executing software code. The notation of a node is a shaded, three-dimensional box. You can choose between two types of node elements:

    • The node element, which represents a specific type of node, for example, a server

    • The node instance element, which represents an instance of a node type

    In Exercise 5-20, you’ll create a deployment diagram and add a node element and a node instance element.


    EXERCISE 5-20

    1. Open VEA, if it is not already open.

    2. Create a deployment diagram named MyDeploymentDiagram.

    3. Add a node named Server to the diagram.

    4. Add a node instance named Web Server Alpha to the diagram. Your deployment diagram should look like Figure 5-36.


    As you can see in Figure 5-36, the node named Web Server Alpha is a node instance element and, as such, an instance of the Server node.


    NOTE In the Model Explorer, you can see only node elements, not node instance elements. This is because node instance elements are simply instances of other node elements.

    Components

    You can add components to your deployment diagram to specify on which servers the components will be physically running. As is the case with nodes, there are two kinds of components:

    • The component element represents a physical component.

    • The component instance element represents a runtime instance of a physical component.

    You can document on which server (node) the components will be running by applying them to the specific node.

    In Exercise 5-21, you’ll add two components to your deployment diagram: Customer and Discount (see Figure 5-35).


    EXERCISE 5-21

    1. On MyDeploymentDiagram, add a component named Customer.

    2. Add a component named Discount to the diagram.

    3. Double-click the Customer component to open the UML Component Properties dialog box.

    4. Select the Nodes category.

    5. Select the Server node. The UML Component Properties dialog box should now look like Figure 5-37.


    Figure 5-37.  UML Component Properties dialog box

       6.  Click OK.


    In the exercise, you used the UML Component Properties dialog box to specify on which node the Customer component would run. Another way to do this is through the UML Node Properties dialog box. Double-click the node on which the component is running and select the Components category, as shown in Figure 5-38.


    Figure 5-38.  UML Node Properties dialog box

    Relationships

    Deployment diagrams have two basic relationship types:

    Communicates: The communicates relationship is for specifying how two elements communicate with each other. In Figure 5-36, you can see a communicates relationship between the two node elements. This indicates that the two nodes are communicating with each other. Actually, when placing a communicates relationship between two nodes (which represent hardware components, remember?), it usually means that the two nodes are connected in some way. That’s why we’ve made the example of a server connected to an overhead projector (for example, using USB). Figure 5-36 also shows a communicates relationship between the Server component and the Customer component, illustrating that the component is installed on the server and is processed there.

    Dependency: The dependency relationship specifies a dependency between two elements. In Figure 5-36, the Customer component is dependent on the Discount component, and therefore affected by its availability or by changes to its functionality. You can use the dependency relationship freely to specify important issues, helpful for your implementation. For example, in Figure 5-36, we’ve added a dependency relationship between the Server node and the Web Server Alpha node instance to indicate that the server implementation will take place on the server named Web Server Alpha.

    In Exercise 5-22, you’ll add relationships to your deployment diagram.


    EXERCISE 5-22

    1. On MyDeploymentDiagram, add a communicates relationship between the Server and Overhead Projector nodes.

    2. Right-click the relationship and select Shape Display Options from the pop-up menu to show the Shape Display Options dialog box.

    3. Deselect the following options: First end name, Second end name, and End multiplicities. Then click OK.

    4. Add a communicates relationship between the Server node and the Customer component.

    5. Right-click the relationship and select Shape Display Options from the pop-up menu to show the Shape Display Options dialog box.

    6. Deselect the First end name, Second end name, and End multiplicities options. Then click OK.

    7. Add a dependency relationship between the Server node and Web Server Alpha node instance.

    8. Add a dependency relationship between the Customer and Discount components. MyDeploymentDiagram should now look like Figure 5-36.


    More .NET Articles
    More By Apress Publishing


     

    Buy this book now. This article is excerpted from Enterprise Development with Visual Studio .NET, UML, and MSF written by John Erik Hansen and Carsten Thomsen (Apress, 2004; ISBN: 1590590422) Buy this book now.

    .NET ARTICLES

    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek