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
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
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
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)
30. Finish
• Any queries?
• WomenWhoCodeBelfast@Gmail.com
• Twitter
• #WomenWhoCodeBelfast
• @WWCBelfast, @nirushika
Looking forward to seeing you at our next event!
Editor's Notes
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
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