
A package in the
Unified Modeling Language is used "to group
elements
Element or elements may refer to:
Science
* Chemical element, a pure substance of one type of atom
* Heating element, a device that generates heat by electrical resistance
* Orbital elements, parameters required to identify a specific orbit of ...
, and to provide a namespace for the grouped elements".
OMG Unified Modeling Language (OMG UML), Infrastructure, V2.1.1
p.158. A package may contain other packages, thus providing for a hierarchical organization of packages.
Pretty much all UML elements can be grouped into packages. Thus, classes, objects, use case
In software and systems engineering, the phrase use case is a polyseme with two senses:
# A usage scenario for a piece of software; often used in the plural to suggest situations where a piece of software may be useful.
# A potential scenari ...
s, components, nodes, node instances etc. can all be organized as packages, thus enabling a manageable organization of the myriad elements that a real-world UML model entails.
Usage
When organizing functional models (use case models, workflow models etc.), use packages to model the real-world modular structure of the system being modeled. When organizing source code, use packages to represent the different layers of the source code. For instance:
* presentation layer
* controller layer
* data access layer
* integration layer
* business services layer
When organizing component models, use packages to group the components according to ownership and/or reuse possibilities. For instance:
* commercial-off-the-shelf products
* open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
framework components
* custom-built framework components
* custom-built application components
When organizing deployment models, use packages to represent the different types of deployment environments that you will be modeling. For instance:
* production environment
* pre-production environment
* integration test environment
* system test environment
* development environment
References
Unified Modeling Language
{{uml-stub