Vous êtes sur la page 1sur 5

Visual Paradigm for UML Tutorial

UML Package Diagram Tutorial

UML Package Diagram Tutorial


Written Date : March 30, 2010

Package diagram is a kind of UML diagram that can be used to model the relationships among
packages. Typical relationships include dependency, merge, include and containment. In this tutorial,
we will create a package diagram that models the packages of a simple program which involve client
and server sides.

1. Create a new project by selecting File > New Project from the main menu.

2. In the New Project dialog box, name the project as My Web App and click Create Blank
Project to create the project.

3. In Diagram Navigator, expand the node UML Diagrams. Right click on node Package
Diagram and select New Package Diagram from the popup menu.

http://www.visual-paradigm.com/product/vpuml/tutorials/packagediagram.jsp Page 1 of 5
Visual Paradigm for UML Tutorial
UML Package Diagram Tutorial

4. A blank package diagram is created. You can edit its name at the top left corner of diagram. In
this tutorial, just keep using Package Diagram1 as name. Click on the background of diagram to
confirm the naming.

5. In the system we are going to model, there are basically four package:
PackageDescription
client Store the classes of the client side application
serverStore the classes of the server side application
data Store the classes for storing and retrieving data from
database
util Store utility classes for manipulating text and calculation
Now, create the package Client first. Select Package from the diagram toolbar.

6. Click on the diagram to create a package. Enter client as its name and click on the diagram
background to confirm the naming.

http://www.visual-paradigm.com/product/vpuml/tutorials/packagediagram.jsp Page 2 of 5
Visual Paradigm for UML Tutorial
UML Package Diagram Tutorial

7. The classes in client package need to access the classes in data package for storing and
retrieving data from database. Therefore, we shall create package data with a dependency
from package client to data. Move the mouse pointer to client. Press on the resource icon
Dependency -> Package and drag it to the right. Release the mouse button and name the
package as data.

8. Package server need to access data in database. Create a package server near data. Make use
of resource centric interface to connect it from server to data.

9. Now comes the package util. Classes in both client and server package need to make use of the
utilities in package util. Make use of resource centric interface to create package util from client,
with a dependency between them.

http://www.visual-paradigm.com/product/vpuml/tutorials/packagediagram.jsp Page 3 of 5
Visual Paradigm for UML Tutorial
UML Package Diagram Tutorial

10. Move the mouse pointer to server. Press on the resource icon Dependency -> Package. Drag
to the package util and release the mouse button.

11. In the package util, there are two sub-packages text and math for storing classes of different
kind of utilities. Enlarge package util first.

12. Select Package in diagram toolbar. Click inside the package util to create package text. Repeat
this step to create another package math.

13. Save the project by selecting File > Save Project from the main menu. This is the end of
tutorial.

http://www.visual-paradigm.com/product/vpuml/tutorials/packagediagram.jsp Page 4 of 5
Visual Paradigm for UML Tutorial
UML Package Diagram Tutorial

Visual Paradigm for UML home page


(http://www.visual-paradigm.com/product/vpuml/)

UML tutorials Visual Paradigm home page


(http://www.visual-paradigm.com/product/vpuml/tutorials.jsp) (http://www.visual-paradigm.com/)

http://www.visual-paradigm.com/product/vpuml/tutorials/packagediagram.jsp Page 5 of 5

Vous aimerez peut-être aussi