Grasp principles

download Grasp principles

of 21

Embed Size (px)

Transcript of Grasp principles

1. GRASP PRINCIPLES By Anastasiya Rybik 2. , . 3. WHAT IS GRASP ? General Responsibility Assignment Software Pattern 4. WHAT IS GRASP ? 1. Information Expert ( ) 2. Creator () 3. Controller () 4. Low Coupling ( ) 5. High Cohesion ( ) 6. Polymorphism () 7. Pure Fabrication ( ) 8. Indirection () 9. Protected Variations ( ) 5. INFORMATION EXPERT , . Customer Item Shopping Card getTotal 6. CREATOR : ? : , : B A. B A. B A B A 7. LOW COUPLING : , ? : , . 8. HIGH COHESION : , , : 9. CONTROLLER : ? : : , , , 10. CONTROLLER Business Object User InterfaceController 11. CONTROLLER : 1. , , 2. , ( Information Expert High Cohesion) 3. , 12. POLYMORPHISM : ? : , . 13. getArea()getArea() getArea() POLYMORPHISM Circle Shape Triangle 14. PURE FABRICATION : Low Coupling Hight Cohesion, Information Expert () ? : , 15. PURE FABRICATION Shape ShapeReposit ory DB 16. INDIRECTION : , ? : , 17. INDIRECTION Object1 Object2 Object3 Object4 18. INDIRECTION Object1 Object2 Object3 Object4 Indirection Object 19. PROTECTED VARIATIONS : , , ? : ; , 20. PROTECTED VARIATIONS Shopping Card IProduct Electronics Clothing Grocery 21. QUESTIONS?