Design Patterns in Context ©SoftMoore ConsultingSlide 1.

Slides:



Advertisements
Similar presentations
Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
Advertisements

18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
CS590L - Lecture 6 1 CS590L Distributed Component Architecture References: - E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of.
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
(c) 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 21:42:16 Informatics 122 Software Design II Lecture 8 André van der Hoek.
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
Design Patterns CS is not simply about programming
Copyright © Active Frameworks, Inc.. - All Rights Reserved - V2.0 Introduction - Page L1-1 PS95&96-MEF-L1-1 Dr. M.E. Fayad Creationa l Paradigm.
Design Patterns. What are design patterns? A general reusable solution to a commonly occurring problem. A description or template for how to solve a problem.
Visual Basic: An Object Oriented Approach 11 – Patterns in object oriented programming.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
(c) 2010 University of California, Irvine – André van der Hoek1June 29, 2015 – 08:55:05 Informatics 122 Software Design II Lecture 8 André van der Hoek.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Design Patterns.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
CSSE 374: Introduction to Gang of Four Design Patterns
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they?
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
DESIGN PATTERNS CSC532 Adv. Topics in Software Engineering Shirin A. Lakhani.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CSE 403, Spring 2008, Alverson Software Design “There are two ways of constructing a software design: one way is to make it so simple that there are obviously.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
What to know for the exam. Smalltalk will be used for questions, but there will not be questions about the grammar. Questions might ask – how particular.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Copyright © Active Frameworks Inc. - All Rights Reserved - V2.0Design Pattern Catalog - Page L3-1 PS95&96-MEF-L10-1 Dr. M.E. Fayad Creationa.
Architectural Styles, Design Patterns, and Objects Joe Paulowskey.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas.
Advanced Object-Oriented Design Patterns and Architectures Part One COEN396A John Xiao
Stephenson College DP 98 1 Design Patterns by Derek Peacock.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Design Patterns Introduction
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 و ابتغ فيما آتاك الله الدار.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
1 Good Object-Oriented Design Dr. Radu Marinescu Lecture 4 Introduction to Design Patterns.
Overview of Behavioral Patterns ©SoftMoore ConsultingSlide 1.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Design Patterns: MORE Examples
The Object-Oriented Thought Process Chapter 15
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
Design Patterns Introduction
CMPE 135: Object-Oriented Analysis and Design October 24 Class Meeting
How to be a Good Developer
object oriented Principles of software design
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
How to be a Good Developer
Web Programming Language
Informatics 122 Software Design II
DESIGN PATTERNS : Introduction
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
Informatics 122 Software Design II
Presentation transcript:

Design Patterns in Context ©SoftMoore ConsultingSlide 1

Characteristics of Design Patterns Provide simple and elegant solutions to specific problems in object-oriented software design Consist of descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context Different from –application frameworks –class libraries –components Discovered, not invented (Rule of Three) ©SoftMoore ConsultingSlide 2

Characteristics of Design Patterns (continued) Capture solutions that have developed and evolved over time as designers strive for greater reuse and flexibility (not initial solutions) ©SoftMoore ConsultingSlide 3 “One thing expert designers know not to do is solve every problem from first principles. Rather, they reuse solutions that have worked for them in the past. When they find a good solution, they use it again and again. Such experience is what makes them experts.” – Gamma et al.

Three Levels of Expertise: An Analogy with Chess (Robert C. Martin) Becoming a Chess Master –Learn rules (pieces, legal moves, goals, etc.) –Learn principles (e.g., value of controlling center of board) –Study the games of chess masters Becoming an OOD Master –Learn basics of programming (language syntax/semantics, data structures, algorithms, etc.) –Learn principles (encapsulation, cohesion, coupling, Liskov Substitution Principle, etc.) –Study the designs of OOD masters ©SoftMoore ConsultingSlide 4

Anticipating Change Software designs must anticipate changes and extensions –new requirements –changes to existing requirements Each design pattern lets some aspect of system structure vary independently of other aspects, thereby making a system more robust to a particular kind of change. ©SoftMoore ConsultingSlide 5 “Program to an interface, not an implementation.” – Gamma et al.

Impact of the GOF Book ©SoftMoore ConsultingSlide 6 “The revolutionary concept of the GOF book is not the fact that there are patterns; it is the way in which those patterns are documented.... Prior to the GOF book, the only good way to learn patterns was to discover them in design documentation, or (more probably) code.” – Robert C. Martin

Software patterns as a symptom of failure? ©SoftMoore ConsultingSlide 7 “The ultimate target for Software Patterns may not be the programmers they were initially design for, but for programming language designers.” – Rick Jelliffe

Using Design Patterns ©SoftMoore ConsultingSlide 8 “The more complicated a pattern is, the less common it tends to be. It’s no coincidence that Flyweight, Interpreter, and Visitor are among the most complex, least understood, and least used patterns in our repertoire. When you need them, you need them; that’s when most people bother to learn them. Until such time, they’re easy to ignore.” – John Vlissides

Leftover Patterns (from Head First Design Patterns) “Since Design Patterns: Elements of Reusable Object- Oriented Software first came out, developers have applied these patterns thousands of times. The patterns we summarize in this appendix are full-fledged, card carrying, official GoF patterns, but aren’t always used as often as the patterns we’ve explored so far. But these patterns are awesome in their own right, and if your situation calls for them, you should apply them with your head held high. Our goal in this appendix is to give you a high level idea of what these patterns are all about.” –Bridge– Builder– Chain of Responsibility –Flyweight– Interpreter– Mediator –Memento– Prototype– Visitor ©SoftMoore ConsultingSlide 9

Specialized Patterns (John Moore) In general, I find the following patterns to be somewhat less useful than the others except in highly specialized cases. Creational –Abstract Factory Structural –Flyweight (but Java Enums are very useful) Behavioral –Interpreter –Visitor ©SoftMoore ConsultingSlide 10

The Role of Design Patterns Provide common vocabulary for communication and design documentation Provide framework for evolution and improvement of existing patterns Promote system understanding by focusing on a higher level of abstraction than that of a design notation or programming language Improve the design skills of software developers Assist in implementing software designs ©SoftMoore ConsultingSlide 11

References COMPOSITE à la Java, Part I (John Vlissides) “Software patterns as a symptom of failure?” by Rick Jelliffe, O’Reilly Media. ©SoftMoore ConsultingSlide 12