What is A Package?

Packages in the Unified Modeling Language are used to group elements and provide namespaces for the grouped elements. A package can contain other packages, thus providing a hierarchical organization of packages.

Almost all UML elements can be grouped into packages. Thus, classes, objects, use cases, components, nodes, node instances, etc. can be organized into packages, thus making the organization of the myriad elements contained in a real-world UML model manageable.

In this example, there is a package containing a class diagram.

 

Class Diagram template: Class Diagram - Class in a Package (Airline) (Created by Diagrams's Class Diagram maker)

What is a Package Diagram in UML?

Large systems provide special challenges. Drawing a model of a class for a large system is too big for it to understand. There are too many connections between classes to understand. A useful technique for dealing with this problem is the UML package. Packages in the Unified Modeling Language help.

  1. To group elements
  2. To provide a namespace for the grouped elements
  3. A package may contain other packages, thus providing for a hierarchical organization of packages.
  4. UML elements can be grouped into packages.

Thus, a package diagram, a structure diagram, shows the arrangement and organization of model elements in a medium to large project. Package diagrams can show both the structure and the dependencies between subsystems or modules, showing different views of a system, for example, as a multi-layer (aka multilayer) application – a multi-layer application model.

Package Diagram Examples

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.

Package Diagram Example

 

More UML Package Diagram Examples

Layered Application

Package Diagram template: Layered Application (Created by InfoART's Package Diagram marker)
Edit this Diagram

 

MVC Structure
Stocks Trading System
Ticket Selling System
General Business System