0
Intro to Design Patterns
Funu Joel
Overview
★ What design patterns are.
★ Why they are important.
★ Some OO basics and Design Principles
★ Classifications of...
What are Design Patterns?
Definitions
★ A pattern describes a problem which occurs over and
over again in our environment, and then describes the
co...
Elements of a pattern design
★ The pattern name
○ It is used to describe a design problem, its solutions and
consequences ...
Why are they important?
Benefits of design patterns
★ They provide proven solutions to software
development issues.
★ They make communications bet...
Benefits of design patterns
★ They prevent from wasting your time hacking
your way into a solution.
★ They shift your leve...
OO basics and design principles
objected oriented basics
★ Abstraction
★ Encapsulation
★ Polymorphism
★ Inheritance
object oriented design principles
★ Separate what varies from what stays the
same .
★ Favor composition over inheritance.
...
principles cont'd
★ Strive for loosely coupled design between
objects.
★ Classes should be open to extension but
closed fo...
Classifications of Design Patterns
Classifications
★ Creational Design Patterns
★ Behavioural Design Patterns
★ Structural Design Patterns
Creational Patterns
“These are design patterns that deal
with object creation mechanisms.”
Types of creational patterns
★ Factory method pattern
★ Abstract factory pattern
★ Builder pattern
★ Prototype pattern
★ S...
Factory method pattern
“ ”
UML representation
Code representation
Behavioral Patterns
“are patterns that identify common
communication patterns between objects and
realize them to increase...
Types of behavioral patterns
★ Strategy
★ Observer
★ State
★ Command
★ Iterator
★ Mediator
★ Memento
★ Template method
★ V...
Strategy Pattern
“ ”
UML representation
Structural Patterns
“these are patterns that identify simple
ways to realize relationships between
entities.”
Types of structural patterns
★ Adapter
★ Bridge
★ Decorator
★ Composite
★ Facade
★ Flyweight
★ Proxy
Proxy Pattern
“allows you to provide an interface to
other objects by creating a wrapper
class as the proxy ”
UML representation
Upcoming SlideShare
Loading in...5
×

Design Patterns (by Joel Funu at DevCongress 2013)

1,697

Published on

A tech talk on Design Patterns delivered by Joel Funu at DevCongress 2013 on 24th August, 2013.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,697
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
112
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Design Patterns (by Joel Funu at DevCongress 2013)"

  1. 1. Intro to Design Patterns Funu Joel
  2. 2. Overview ★ What design patterns are. ★ Why they are important. ★ Some OO basics and Design Principles ★ Classifications of Design Patterns ★ Examples
  3. 3. What are Design Patterns?
  4. 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. 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
  6. 6. Why are they important?
  7. 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. 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.
  9. 9. OO basics and design principles
  10. 10. objected oriented basics ★ Abstraction ★ Encapsulation ★ Polymorphism ★ Inheritance
  11. 11. object oriented design principles ★ Separate what varies from what stays the same . ★ Favor composition over inheritance. ★ Always program to interfaces not implementations.
  12. 12. principles cont'd ★ Strive for loosely coupled design between objects. ★ Classes should be open to extension but closed for modification.(open-close principle)
  13. 13. Classifications of Design Patterns
  14. 14. Classifications ★ Creational Design Patterns ★ Behavioural Design Patterns ★ Structural Design Patterns
  15. 15. Creational Patterns “These are design patterns that deal with object creation mechanisms.”
  16. 16. Types of creational patterns ★ Factory method pattern ★ Abstract factory pattern ★ Builder pattern ★ Prototype pattern ★ Singleton pattern
  17. 17. Factory method pattern “ ”
  18. 18. UML representation
  19. 19. Code representation
  20. 20. Behavioral Patterns “are patterns that identify common communication patterns between objects and realize them to increase flexibility in these communication.”
  21. 21. Types of behavioral patterns ★ Strategy ★ Observer ★ State ★ Command ★ Iterator ★ Mediator ★ Memento ★ Template method ★ Visitor
  22. 22. Strategy Pattern “ ”
  23. 23. UML representation
  24. 24. Structural Patterns “these are patterns that identify simple ways to realize relationships between entities.”
  25. 25. Types of structural patterns ★ Adapter ★ Bridge ★ Decorator ★ Composite ★ Facade ★ Flyweight ★ Proxy
  26. 26. Proxy Pattern “allows you to provide an interface to other objects by creating a wrapper class as the proxy ”
  27. 27. UML representation
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×