![]() |
SearchWiki Heuristics.RecentChanges Edit Page Page Revisions |
| Home Design Patterns Heuristics Software Development Software Process Patterns TheIntroduction LogicalDesign PhysicalDesign PatternFoundations GuidelinesAndMyths ReferenceImplementation DependencyPatterns UsabilityPatterns ExtensibilityPatterns MaintenancePatterns AntiPatterns UtilitiesAndTools AllPatterns | NameAcyclicAssociationsStatementDesign uni-directional associations.SketchDescriptionA cyclic relationship exists when two classes hold references to each other. The worst case scenario for a cyclic relationship is when two classes are contained in two different components. The result is a violation of AcyclicRelationships for the two components. Even if two classes are in the same component, or some package, a cyclic relationship between classes creates a higher maintenance cost, and increases complexity. Often times, AbstractCoupling can be applied to eliminate cyclic dependencies. A bi-directional relationship between two concrete classes is undoubtedly the strongest form of coupling. A bi-directional relationship exists between two classes when each class references the other. Figure 8.4.1 illustrates a bi-directional relationship between classes Client1 and Client2. Three way bi-directional when A --> B --> C --> A There are three manifestations of a bi-directional association:
Implementation VariationsSolutions:
ConsequencesSample CodeRelated Pattern(s) |