Difference between revisions of "Object Orientation with Design Patterns"

From Sinfronteras
Jump to: navigation, search
Line 6: Line 6:
 
* https://refactoring.guru/design-patterns
 
* https://refactoring.guru/design-patterns
  
What are design patterns?
+
==What are design patterns==
 
* They provide solutions to common software design problems.
 
* They provide solutions to common software design problems.
 
* Generally aimed at solving the problems of object generation and interaction, rather than the larger scale problems of overall software architecture  
 
* Generally aimed at solving the problems of object generation and interaction, rather than the larger scale problems of overall software architecture  
 
* They give generalised solutions in the form of templates that may be applied to real-world problems.
 
* They give generalised solutions in the form of templates that may be applied to real-world problems.
  
Why use design patters?
+
===Why use design patters===
 
* Flexibility: Using design patterns your code becomes more flexible. It helps to provide the correct level of abstraction due to which objects become loosely coupled to each other which makes your code easy to maintain.  
 
* Flexibility: Using design patterns your code becomes more flexible. It helps to provide the correct level of abstraction due to which objects become loosely coupled to each other which makes your code easy to maintain.  
  

Revision as of 12:58, 8 February 2019

Amilcar Aponte amilcar@cct.ie

Literature

What are design patterns

  • They provide solutions to common software design problems.
  • Generally aimed at solving the problems of object generation and interaction, rather than the larger scale problems of overall software architecture
  • They give generalised solutions in the form of templates that may be applied to real-world problems.

Why use design patters

  • Flexibility: Using design patterns your code becomes more flexible. It helps to provide the correct level of abstraction due to which objects become loosely coupled to each other which makes your code easy to maintain.
  • Reusability: Loosely coupled and cohesive objects and classes can make your code more reusable.
  • Shared Vocabulary:
    • Shared vocabulary makes it easy to share your code and thought with other team members.
    • It creates more understanding between the team members related to the code.
  • Capture best practices – In my opinion, the most important!:
    • Design patterns capture solutions that have been successfully applied to problems.
    • By learning these patterns and the related problem, an inexperienced developer learns a lot about software design.
    • These solutions have been tested, used, reused and used again – And they work!