Structural Patterns rule category
The Structural Patterns rule category contains patterns
that show various types of structural elements, including structural
antipatterns.
Pattern | Purpose |
---|---|
Component Cyclic Dependency | This pattern is a structural antipattern that consists of interdependent components. A cyclic dependency between components is considered a major architectural flaw. Such a dependency makes the code difficult to understand and maintain. More important, cyclic dependencies compromise software testing, parallel development, and reuse. Large-scale software with many cyclic dependencies is fragile and unstable. |
Component Global Breakable | This pattern is a structural antipattern for a system component that is often affected when any other component is changed. Except for high-level concrete implementations, global breakables are undesirable because they indicate fragility and a lack of modularity in the system. |
Component Global Butterfly | This pattern is a structural pattern for an object that has many global dependents. Changes to a global butterfly often have a significant impact on the rest of the system. For this reason, a global butterfly should only be either a basic system interface or a utility class. |
Component Global Hub | This pattern is a structural antipattern for a component that has many global dependencies and many global dependents. A global hub is often affected when anything in the system changes, and it affects a significant percentage of the system when it changes. Global hubs are undesirable because they indicate fragility and lack of modularity in the system. |
Component Local Breakable | A Component Local Breakable pattern is a structural antipattern for a component that has many immediate dependencies. Such a component carries excessive responsibility and typically has many long methods. Breakables make the code difficult to understand, maintain, and reuse. |
Component Local Butterfly | This pattern is a structural pattern for a component that has many immediate dependents. Changes to a local butterfly often have a significant immediate impact on the rest of the system. For this reason, a local butterfly should only be either a basic system interface or a utility class. |
Component Local Hub | This pattern is a structural antipattern for a component that has many immediate dependencies and many immediate dependents. Such a component carries excessive responsibility and also serves as a utility or commonly used component. Hubs make the code difficult to understand, maintain, and reuse. Hubs also make the code fragile and unstable. |
Package Cyclic Dependency | This pattern is a structural antipattern that consists of interdependent packages. A cyclic dependency between packages is considered a major architectural flaw. Such a dependency makes the code difficult to understand and to maintain. More importantly, cyclic dependencies undermine testability, parallel development, and reuse. Large-scale software with many cyclic dependencies is fragile and unstable. |
Package Global Breakable | This pattern is a structural antipattern for a package that has many global dependencies. Such a package carries excessive responsibility and typically contains several components with many global dependencies. |
Package Global Butterfly | This pattern is a structural pattern for a package that has many global dependents. Changes to a global butterfly often have a significant impact on the rest of the system. For this reason, a global butterfly package should only consist of either basic system interfaces or utility classes. |
Package Global Hub | This pattern is a structural antipattern for a package that has many immediate dependencies. Such a package carries globally excessive responsibility and also serves as a utility or commonly used package. The package usually contains many components that have several global dependencies and dependents. Package Global Hubs break the reusability of modules and make the code difficult to understand and maintain. |
Package Local Breakable | This pattern is a structural antipattern for a package that has many immediate dependencies. Such a package carries excessive responsibility. The package typically contains a large number of components or several components with many immediate dependencies. A Package Local Breakable makes the code difficult to understand, maintain, and reuse. |
Package Local Butterfly | This pattern is a structural pattern for a package that has many immediate dependents. Such a package serves as a utility or commonly used package. |
Package Local Hub | This pattern is a structural antipattern for a package that has many immediate dependencies and dependents. Such a package carries excessive responsibility and also serves as a utility or commonly used package. The package typically contains many components that can have many immediate dependencies. Hubs make the code difficult to understand, maintain, and reuse. Hubs also make the code fragile and unstable. |