Package diagram shows the arrangement and organization of model elements in middle to large scale project that can be used to show both structure and dependencies between sub-systems or modules.
Big systems offer special challenges. Draw a class model for a large system, and it is too big to comprehend. There are too many links between classes to understand. A useful technique to handle this is that of UML's packages. A package in the Unified Modeling Language helps:
The illustration below shows an example package diagram is used to represent the composition of a business.
Finding an online Package Diagram tool? Just click the draw button on the right to create your Package Diagram online. Visual Paradigm Online is free* and intuitive. You can also go through this Package Diagram tutorial to learn about Package Diagram before you get started.
Draw NowPackage diagrams are used to structure high level systems. Packages are used for organizing large system which contains diagrams, documents and other key deliverables. In other words, packages can be used as a part of other diagrams also.
A package can be represented as a hierarchical structure with nested packages. Atomic module for nested package are usually class diagrams.
The figure below gives an example of package diagram that consists of several nested packages.
There are few constraints while using package diagrams, they are as follows.
A package can also has a fully qualified name. The figure below shows an example use of such a package.
Note That:
Package Containment
There are two sub-types involved in dependency. They are <<access>> & <<import>>. Though there are two stereotypes users can use their own stereotype to represent the type of dependency between two packages.
<<import>> - one package imports the functionality of other package
Example – <<import>> Dependency
<<access>> - one package requires help from functions of other package
The UML does not treat package diagrams as a separate technique, It is often useful to combine them by grouping other model elements together into different packages on the same diagram. Package diagrams can be useful in many ways, such as:
Other Guidelines for Packages
The following example shows the Track Order Service for an online shopping store.
Track Order Service is responsible for providing tracking information for the products ordered by customers. Customer types in the tracking serial number, Track Order Service refers the system and updates the current shipping status to the customer.
Step 1 - Identify the packages present in the system
Step 2 - Identify the dependencies
Step 3 - Finally, Track Order dependency to UI Framework is also mapped in to the diagram which completes the Package Diagram for Track Order subsystem.
Package Diagram Example – MVC Structure
Package Diagram Example - Layering Structure
You've learned what a Package Diagram is and how to draw a Package Diagram step-by-step. It's time to get your hands dirty by drawing a Package Diagram of your own. Draw UML diagrams free* with Visual Paradigm Online. It's easy-to-use, intuitive.
Draw Now* The Free edition supports free usage of Visual Paradigm Online for non-commercial use only.