Deploymentdiagram

UML Modeling: Creating a deployment diagram

This article introduces you to the UML Modeling feature's Deployment diagram functionality, and describes how to create a simple Deployment diagram within the Sun Java Studio Enterprise 8 IDE and the NetBeans Enterprise Pack 6.0.


__What is a deployment diagram? __

A deployment diagram models the run-time architecture of a system. It shows the configuration of the hardware elements (nodes) and shows how software elements and artifacts are mapped onto those nodes.

Deployment diagrams can also be created to explore the architecture of embedded systems, showing how the hardware and software components work together. In short, you may want to consider creating a deployment diagram for all but the most trivial of systems.


Take this general approach when you use the IDE to create a State diagram:

a) Create a UML Project and add a Deployment diagram.

b) Identify the scope of the model.

c) Consider fundamental technical issues

d) Identify the nodes and their connections.

e) Distribute software to nodes.


Now, let’s proceed to detailed steps:


1) __Create a UML Project and add a State diagram __

The IDE does the following:

Creates a platform-independent project especially designed to handle UML modeling work.

Displays the project icon in the Project window.

Generates a Deployment diagram in the project.

Displays the Deployment diagram icons under both Project Model and Project Diagrams.

Opens and displays the Deployment diagram in the diagram editor.

Opens the modeling palette to display the particular icons that are used to build Deployment diagrams.

Next, we will draw a Deployment diagram for a customer accessing database from a web server.


2) Identify nodes:

    From the palette add three nodes and name them as:

- CustomerPC - WebServer - DBServer

3) Now, add stereotypes to the entire three nodes.

     Select a node.

    Go to properties window of a node.
    Click on the custom editor of property ‘stereotypes’ to open it.
    Click on ‘add’ button in the stereotype window and write ‘device’.
    Click OK.
       
       Repeat all the steps for other two nodes.
       Your diagram now looks like this:
  


File:Deploymentdiagram/1 Deploymentdiagram.JPG



4) Now, add components


   Select component from the palette.
   
   Add two components at node ‘CustomerPC’, two at node ‘WebServer’ and 
   one component at ‘DBServer’.
    

Select a component at node ‘CustomerPC’ and in property window of a component

and change the name property to ‘WebBrowser’. 

Similarly, name all other components according to given names:
    
        For node        
  • ‘CustomerPC’ – WebBrowser , JavaApplet
  • ‘WebServer’ - AppacheHttpd, JavaServlet
  • ‘DBServer’ - MySQL


Your diagram now looks like this:



File:Deploymentdiagram/2 Deploymentdiagram.bmp



5) Add Interfaces.

    Select option ‘Interface’ from palette .
    
    Click at node to add interfaces
        
    To name the interface , select an interface and in property window change Name property to name them accordingly as shown below :  


        __ For node :
                          
          ‘WebServer’ –  IApacheHttpd, IJavaServlet ,   ‘DBServer’   -  IMySQL.__


    After adding interfaces, right click at each interface and select show-> As Icon
    so that it appears as icon rather than as rectangular boxes.   


       Now, Select option ‘Association’.
        
       Click on a interface and a component  to associate them as per following:
                
 Interface     ->          Component  
  • IApacheHttpd -> ApacheHttpd
  • IJavaServlet -> JavaServlet
  • IMySQL -> MySQL
  Select Association line of interface IMySQL and right click on it. 
   Select Label->Link Name and type ‘JDBC’.
       Your diagram now looks like this:
                        File:Deploymentdiagram/3 Deploymentdiagram.bmp


6) Now, Add dependencies and associations .

    Click on option dependency.
    
 Click on a interface and a component to add dependency.To label each dependency,  select dependency arrow() and right click and select label->Name and type name as per      following:
        __    Component         ->           Interface      ,            Label
           __
  • WebBrowser -> IApacheHttpd , HTTP
  • JavaApplet -> IJavaServlet , SSL
  • JavaServlet -> IMySQL , SSL
   Also add dependency b/w two components i.e. from JavaApplet to WebBrowser.
     
   Now to add association, select option association .
   
   Click on nodes ‘CustomerPC’ and ‘WebServer’ to associate it and label it as ‘TCP/IP’.
 
 Similarly , associate nodes ‘WebServer’ and ‘DBServer’ labeling it as ‘TCP/IP’.
  
   Your final deployment diagram will look like this :


File:Deploymentdiagram/4 Deploymentdiagram.bmp

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo