Enter your email address:

    Delivered by FeedBurner

Package Diagrams


Introductions
- Package diagrams and package dependencies result from class diagrams.
- Class A depends on class B, A B, if changes to the definition of class B may cause an effect on class A.
Examples :
• class A sends a message to class B;
• class A has class B as part of its data;
• class A mentions class B as parameter to an operation.
- In an ideal oo-world, modifications which don’t change a class interface should not affect any other classes.

Dependencies in Programming Languages
1. Java
- Imports are non-transitive.
- Optional package visibility to reduce the level of nested details.
- Possibility of generating Facades which are explicit interface classes between packages.
2. C++
- Includes in C++ are transitive.
- No compiler supported “hide” option for nested classes.
- Complex makefiles which include tests on already defined objects.

Nested Packages
- Instead of drawing many separate dependencies, the technique of sub-packages reduces redundant dependency information.
- Instead of drawing many separate dependencies, the technique of sub-packages reduces redundant dependency information.
- Draw dependencies to and from the overall package, instead of many separate dependencies.
- An overall package can contain :
• classes
• class diagrams
• package diagrams
- Dependencies on an overall package represent dependencies on all members of the package.
- Separate dependencies on single members of the overall package can still occur.

Dependencies : Visibility
What does it mean to draw a dependency to a package that contains subpackages ?
- Convention “transparent”: gives visibility to the classes in the package and in the subpackage.
- Convention “opaque”:gives visibility to the top-level classes only, not to the nested classes.
- Make clear, which convention you use in your project (by use of <> or <> stereotypes).

Package Generalization
- Generalization between packages means that the specific package must conform to the interface of the general package.
- To emphasize the role of a general interface, the package can be marked as {abstract}.
- Example: An abstract database interface consisting of several classes is implemented either for Oracle or for Sybase.

When to Use Package Diagrams
- Use package diagrams for distributing and balancing work between development groups.
- Package diagrams are helpful to explore the possibilities of partitioning tasks in the development process.
- Package diagrams are extremely useful for testing purposes: rather apply tests on packages (i.e., several interdependent classes) than on single routines.

Introductions
- Package diagrams and package dependencies result from class diagrams.
- Class A depends on class B, A B, if changes to the definition of class B may cause an effect on class A.
Examples :
• class A sends a message to class B;
• class A has class B as part of its data;
• class A mentions class B as parameter to an operation.
- In an ideal oo-world, modifications which don’t change a class interface should not affect any other classes.

Dependencies in Programming Languages
1. Java
- Imports are non-transitive.
- Optional package visibility to reduce the level of nested details.
- Possibility of generating Facades which are explicit interface classes between packages.
2. C++
- Includes in C++ are transitive.
- No compiler supported “hide” option for nested classes.
- Complex makefiles which include tests on already defined objects.

Nested Packages
- Instead of drawing many separate dependencies, the technique of sub-packages reduces redundant dependency information.
- Instead of drawing many separate dependencies, the technique of sub-packages reduces redundant dependency information.
- Draw dependencies to and from the overall package, instead of many separate dependencies.
- An overall package can contain :
• classes
• class diagrams
• package diagrams
- Dependencies on an overall package represent dependencies on all members of the package.
- Separate dependencies on single members of the overall package can still occur.

Dependencies : Visibility
What does it mean to draw a dependency to a package that contains subpackages ?
- Convention “transparent”: gives visibility to the classes in the package and in the subpackage.
- Convention “opaque”:gives visibility to the top-level classes only, not to the nested classes.
- Make clear, which convention you use in your project (by use of <> or <> stereotypes).

Package Generalization
- Generalization between packages means that the specific package must conform to the interface of the general package.
- To emphasize the role of a general interface, the package can be marked as {abstract}.
- Example: An abstract database interface consisting of several classes is implemented either for Oracle or for Sybase.

When to Use Package Diagrams
- Use package diagrams for distributing and balancing work between development groups.
- Package diagrams are helpful to explore the possibilities of partitioning tasks in the development process.
- Package diagrams are extremely useful for testing purposes: rather apply tests on packages (i.e., several interdependent classes) than on single routines.

Recent Articles

Blog Archive