2. Overview
★ What design patterns are.
★ Why they are important.
★ Some OO basics and Design Principles
★ Classifications of Design Patterns
★ Examples
4. Definitions
★ A pattern describes a problem which occurs over and
over again in our environment, and then describes the
core of the solution to that problem, in such a way that
you can use this solution a million times. (Alexander,
1977).
★ A design pattern is a general, reusable solution to a
common problem in software design.(gof, 1995).
5. Elements of a pattern design
★ The pattern name
○ It is used to describe a design problem, its solutions and
consequences in a word or two.
★ The problem
○ It describes when to apply the pattern.
★ The solution
○ It describes the elements that make up the design, their
relationships, responsibilities and collaborations
★ The consequences.
○ the results an tradeoffs of applying the pattern
7. Benefits of design patterns
★ They provide proven solutions to software
development issues.
★ They make communications between
developers more efficient.
★ They make it easier to change and maintain
software.
8. Benefits of design patterns
★ They prevent from wasting your time hacking
your way into a solution.
★ They shift your level of thinking to higher
perspective.
★ They enable design efficient and scalable
applications.
11. object oriented design principles
★ Separate what varies from what stays the
same .
★ Favor composition over inheritance.
★ Always program to interfaces not
implementations.
12. principles cont'd
★ Strive for loosely coupled design between
objects.
★ Classes should be open to extension but
closed for modification.(open-close principle)
20. Behavioral Patterns
“are patterns that identify common
communication patterns between objects and
realize them to increase flexibility in these
communication.”