design patterns l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Design Patterns PowerPoint Presentation
Download Presentation
Design Patterns

Loading in 2 Seconds...

play fullscreen
1 / 26

Design Patterns - PowerPoint PPT Presentation


  • 329 Views
  • Uploaded on

Design Patterns. Trends and Case Study John Hurst June 2005. Overview. Software Patterns Design Patterns Topics Case Study / Examples. Introduction. Christopher Alexander A Pattern Language: Towns, Buildings, Construction (1977) A Timeless Way of Building (1979)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Design Patterns' - Albert_Lan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
design patterns

Design Patterns

Trends and Case Study

John Hurst

June 2005

overview
Overview
  • Software Patterns
  • Design Patterns
  • Topics
  • Case Study / Examples
introduction
Introduction
  • Christopher Alexander
    • A Pattern Language: Towns, Buildings, Construction (1977)
    • A Timeless Way of Building (1979)
  • “Gang of Four” (Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides)
    • Design Patterns (1995)
  • Buschmann et al
    • Pattern Oriented Software Construction (1996)
key idea
Key Idea
  • A Software Pattern is:
    • A solution
    • To a problem
    • In a context
    • With consequences
  • A Software Pattern has a name and a vocabulary.
pattern languages
Intent

Also Known As

Motivation

Applicability

Structure

Participants

Collaborations

Consequences

Implementation

Known Uses

Related Patterns

Pattern Languages
oo design principles
OO Design Principles
  • Code to interfaces
  • Prefer composition to inheritance
  • Encapsulate what varies
benefits
Benefits
  • Improves thinking about OO design
    • New designs
    • Existing designs
    • Helps us realise the benefits of OO
  • Reuse of solutions to common problems
    • Catalogs
  • Communication tool
    • Common vocabulary
example iterator
Example: Iterator
  • Intent:
    • Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation
example decorator
Example: Decorator
  • Intent:
    • Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
application of decorator
Application of Decorator
  • Apache Commons DBCP (Database Connection Pooling)
patterns landscape
Architectural Patterns

Analysis Patterns

Design Patterns

Patterns Landscape
platform patterns
“Platform Patterns”
  • J2EE Core Patterns
  • MS Building Blocks
  • Contrast with PEAA
antipatterns
Antipatterns
  • Examples
    • Big Ball Of Mud
    • Copy and Paste Programming
    • Magic Container
    • Tower of Voodoo
broken patterns
Broken Patterns
  • Double checked locking
  • “Deprecated” Patterns:
    • Factory Method (due to confusion over what it means)
    • Bridge
    • Flyweight
    • Interpreter
specialised fields
Specialised Fields
  • Real-time
  • Concurrency
  • Enterprise
  • Messaging
  • Analysis
refactoring to patterns
Refactoring to Patterns
  • Remove duplicate code
  • Simplify logic
  • Communicate intention
  • Increase flexibility
patterns with programming languages
Patterns with Programming Languages
  • Strategy
    • C++ templates: static type checking
    • Java interfaces and objects: runtime configuration
    • Ruby/Smalltalk blocks: idiomatic usage
case study hhrdm
Case Study: HHRDM
  • Design Patterns
  • Architectural Patterns
  • Analysis Patterns
design patterns20
Design Patterns
  • Abstract Factory
  • Template Method
  • Strategy
  • Façade
  • Proxy
architectural patterns
Architectural Patterns
  • Layering
  • Data Access Patterns
  • Domain Model
  • Service Façade
analysis patterns
Analysis Patterns
  • Temporal Patterns
    • Effectivity
    • Snapshot
    • Temporal Object
    • Temporal Property
    • Audit Trail
    • Bitemporal Model
references
References
  • Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Design Patterns: Elements of Reusable Object-Oriented Software – Addison-Wesley 1995
  • Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, Michael Stal Pattern-Oriented Software Architecture Wiley 1996
  • Martin Fowler Patterns of Enterprise Application Architecture – Addison-Wesley 2002
  • Martin Fowler Refactoring – Addison-Wesley 2000
  • Martin Fowler Analysis Patterns – Addison Wesley 1996
  • Gregor Hohpe, Bobby Woolfe Patterns of Enterprise Application Integration – Addison-Wesley 2003
  • Joshua Kerievsky Refactoring to Patterns – Addison-Wesley 2004
  • Deepak Alur, John Crupi, Dan Malks Core J2EE Patterns (2nd Ed) – Addison-Wesley 2003
web sites
Web Sites
  • Martin Fowler website http://www.martinfowler.com
  • Portland Pattern Repository http://c2.com/cgi/wiki
  • TheServerSide http://www.theserverside.com
  • Microsoft Patterns and Practices http://msdn.microsoft.com/architecture/patterns/
relationships and similarities
Relationships and Similarities

Many patterns look similar structurally, but have different intent

Proxy

Decorator

the agile manifesto
The Agile Manifesto
  • Preferences:
    • Inidividuals and interactions over processes and tools
    • Working software over comprehensive documentation
    • Customer collaboration over contract negotiation
    • Responding to change over following a plan