Low Coupling is the GRAS Patterns (General Responsibility Assignment Software Patterns) Read about GRASP Patterns: GRASP Patterns Overview Problem How to support low dependency, low change impact, and increase reuse? Solution Assign responsibilities so that coupling remains low. Try to avoid one class to have to know about many others. Key points about low coupling Low dependencies between �artifacts� (classes, modules, components). There shouldn�t be too much of dependency between the modules, even if there is a dependency it should be via the interfaces and should be minimal. Avoid tight-coupling for collaboration between two classes (if one class wants to call the logic of a second class, then first class needs an object of second class it means the first class creates an object of the second class). Strive for loosely coupled design between objects that interact. Inversion Of Control (IoC) / Dependency Injection (DI) - With DI objects are given...
Comments
Post a Comment