SlideShare a Scribd company logo
1 of 30
Colleen Crangle
• Woman in tech throughout the 70s and 80s
• PhD in Philosophy (Logic and the Philosophy of
Language and Science), in follow-up to a BSc
cum laude and an MSc in Computer Science and
Mathematics from South Africa
• Affiliated scholar with the Centre for the Study
of Language and Information at Stanford
University and a partner in a small R&D
business in Silicon Valley, California
Introduction to Design Patterns
Jackie Pollock
Who am I?
• Technical Consultant @ Kainos Software
• Joined June 2006 as Graduate Software
Engineer
• Specialities:
• Document Management
• Workflow

• Scanning
• Integration
Overview
• What are design patterns?
• Why are they useful
• Types of design pattern

• Creational
• Structural
• Behavioural
What is a design pattern?
• General repeatable solution to
commonly occurring problem
• Not a finished design to be transformed
directly into code
• Relationships and interactions between
classes or objects without
implementation specifics
Where did they come from?
• Architectural concept by Christopher
Alexander in 1977
• Ward Cunningham and Kent Beck 1987
“Using pattern languages for objectorientated programmers”
• 1990s Gamma, Helm, Johnson, and
Vlissides. AKA: Gang of Four (GoF)
book “Design Patterns: Elements of
Reusable Object-Oriented Software”
Benefits
• Design reuse
• Uniform design vocabulary
• Enhance understanding, restructuring, &
team communication
• Basis for automation
• Transcends language-centric biases

• Abstracts away from many unimportant
details
Drawbacks
• Require significant tedious & error-prone
human effort to handcraft pattern
implementations / design reuse
• Can be deceptively simple
• May limit design options
• Leaves some important details
unresolved
Creational Patterns
Factory
Creating objects without having to specify
the exact class of object that will be
created – will be determined at runtime
Abstract Factory
Creates family of objects at runtime – each
of which will likely be a Factory in its own
right
Builder
Separates construction of the various
elements from the representation of the
whole therefore same process can create
different variants of theme
Singleton
Only one instance of object across
application. Used to provide single point of
access. Should not be used to replace
global variables
Prototype
Create complex objects by cloning existing ones
and changing required characteristics. Useful when
cost of new objects is prohibitive
Structural Patterns
Adapter
Converts an existing interface into another
that your application can use.
Composite
Treat a group of objects the same way as
a single instance of object. Tree structures
with a has-a relationship
Decorator
Add behaviour to object without affecting
behaviour of other objects from the same
class
Facade
Simplified interface to larger body of code.
Reduces dependencies on inner class
objects, wraps complex product APIs in
manageable layer
Proxy
Placeholder for another object, controlling
access. Used for lazy loading resource
hungry objects
Behavioural Patterns
Command
Turns requests into objects, separating out
the code making the request from the
object performing it
Iterator
Access elements of collection sequentially
without focusing on underlying object
types
Observer
When one object changes state, all
dependent objects notified and updated.
View element of Model-View-Controller
pattern
State
Object alters behaviour when internal state
changes
Word of Caution
Always go for simplistic approach rather
than applying patterns to every situation
If you force-fit a pattern into a situation
where the pattern doesn’t apply, you
are, by definition, not following the pattern
Resources
• Books

• Design Patterns
• Head First Design Patterns
• Design Patterns for Dummies

• Online
• Slideshare

• Pluralsight
• SourceMaking
• Wikipedia

• Image Credits
• Nelleke Verhoeff (Yepr)
Thanks for listening
Any Questions?

j.pollock@kainos.com
@kievia
jackiepollock
Finish
• Any queries?
• WomenWhoCodeBelfast@Gmail.com

• Twitter
• #WomenWhoCodeBelfast
• @WWCBelfast, @nirushika

Looking forward to seeing you at our next event!

More Related Content

Similar to Women Who Code Belfast: Introduction to Design patterns

Design patterns Structural
Design patterns StructuralDesign patterns Structural
Design patterns StructuralUMAR ALI
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanPriyanka Pradhan
 
Design patterns in Object oriented analysis and design
Design patterns in Object oriented analysis and designDesign patterns in Object oriented analysis and design
Design patterns in Object oriented analysis and designKamran Haider
 
Design pattern and their application
Design pattern and their applicationDesign pattern and their application
Design pattern and their applicationHiệp Tiến
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptRushikeshChikane1
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptRushikeshChikane2
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2Julie Iskander
 
Gang of Four in Java
Gang of Four in Java Gang of Four in Java
Gang of Four in Java Mina Tafreshi
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptxSHAHZAIBABBAS13
 
Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018David Litvak Bruno
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questionsjinaldesailive
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxanguraju1
 

Similar to Women Who Code Belfast: Introduction to Design patterns (20)

Oops design pattern_amitgupta
Oops design pattern_amitguptaOops design pattern_amitgupta
Oops design pattern_amitgupta
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
Design patterns Structural
Design patterns StructuralDesign patterns Structural
Design patterns Structural
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
 
Design patterns in Object oriented analysis and design
Design patterns in Object oriented analysis and designDesign patterns in Object oriented analysis and design
Design patterns in Object oriented analysis and design
 
Design pattern and their application
Design pattern and their applicationDesign pattern and their application
Design pattern and their application
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
 
Design Patterns.ppt
Design Patterns.pptDesign Patterns.ppt
Design Patterns.ppt
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Gang of Four in Java
Gang of Four in Java Gang of Four in Java
Gang of Four in Java
 
Design pattern
Design patternDesign pattern
Design pattern
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
 
Designpattern
DesignpatternDesignpattern
Designpattern
 
Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Women Who Code Belfast: Introduction to Design patterns

  • 1.
  • 2. Colleen Crangle • Woman in tech throughout the 70s and 80s • PhD in Philosophy (Logic and the Philosophy of Language and Science), in follow-up to a BSc cum laude and an MSc in Computer Science and Mathematics from South Africa • Affiliated scholar with the Centre for the Study of Language and Information at Stanford University and a partner in a small R&D business in Silicon Valley, California
  • 3. Introduction to Design Patterns Jackie Pollock
  • 4. Who am I? • Technical Consultant @ Kainos Software • Joined June 2006 as Graduate Software Engineer • Specialities: • Document Management • Workflow • Scanning • Integration
  • 5. Overview • What are design patterns? • Why are they useful • Types of design pattern • Creational • Structural • Behavioural
  • 6. What is a design pattern? • General repeatable solution to commonly occurring problem • Not a finished design to be transformed directly into code • Relationships and interactions between classes or objects without implementation specifics
  • 7. Where did they come from? • Architectural concept by Christopher Alexander in 1977 • Ward Cunningham and Kent Beck 1987 “Using pattern languages for objectorientated programmers” • 1990s Gamma, Helm, Johnson, and Vlissides. AKA: Gang of Four (GoF) book “Design Patterns: Elements of Reusable Object-Oriented Software”
  • 8. Benefits • Design reuse • Uniform design vocabulary • Enhance understanding, restructuring, & team communication • Basis for automation • Transcends language-centric biases • Abstracts away from many unimportant details
  • 9. Drawbacks • Require significant tedious & error-prone human effort to handcraft pattern implementations / design reuse • Can be deceptively simple • May limit design options • Leaves some important details unresolved
  • 11. Factory Creating objects without having to specify the exact class of object that will be created – will be determined at runtime
  • 12. Abstract Factory Creates family of objects at runtime – each of which will likely be a Factory in its own right
  • 13. Builder Separates construction of the various elements from the representation of the whole therefore same process can create different variants of theme
  • 14. Singleton Only one instance of object across application. Used to provide single point of access. Should not be used to replace global variables
  • 15. Prototype Create complex objects by cloning existing ones and changing required characteristics. Useful when cost of new objects is prohibitive
  • 17. Adapter Converts an existing interface into another that your application can use.
  • 18. Composite Treat a group of objects the same way as a single instance of object. Tree structures with a has-a relationship
  • 19. Decorator Add behaviour to object without affecting behaviour of other objects from the same class
  • 20. Facade Simplified interface to larger body of code. Reduces dependencies on inner class objects, wraps complex product APIs in manageable layer
  • 21. Proxy Placeholder for another object, controlling access. Used for lazy loading resource hungry objects
  • 23. Command Turns requests into objects, separating out the code making the request from the object performing it
  • 24. Iterator Access elements of collection sequentially without focusing on underlying object types
  • 25. Observer When one object changes state, all dependent objects notified and updated. View element of Model-View-Controller pattern
  • 26. State Object alters behaviour when internal state changes
  • 27. Word of Caution Always go for simplistic approach rather than applying patterns to every situation If you force-fit a pattern into a situation where the pattern doesn’t apply, you are, by definition, not following the pattern
  • 28. Resources • Books • Design Patterns • Head First Design Patterns • Design Patterns for Dummies • Online • Slideshare • Pluralsight • SourceMaking • Wikipedia • Image Credits • Nelleke Verhoeff (Yepr)
  • 29. Thanks for listening Any Questions? j.pollock@kainos.com @kievia jackiepollock
  • 30. Finish • Any queries? • WomenWhoCodeBelfast@Gmail.com • Twitter • #WomenWhoCodeBelfast • @WWCBelfast, @nirushika Looking forward to seeing you at our next event!

Editor's Notes

  1. Creational – concerned with everything about the creation of objectsStructural – how classes and objects are composed to form larger structuresBehavioural – algorithms and assignment of responsibilities between objects
  2. Creational Concerned with everything about the creation of objectsStructural How classes and objects are composed to form larger structuresBehavioural Algorithms and assignment of responsibilities between objects