(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.

Slides:



Advertisements
Similar presentations
(c) 2009 University of California, Irvine – André van der Hoek1April 20, 2015 – 00:59:05 Informatics 122 Software Design II Lecture 11 André van der Hoek.
Advertisements

+ Informatics 122 Software Design II Lecture 7 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Informatics 122 Software Design II
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
© 2009 University of California, Irvine – André van der Hoek1June 10, 2015 – 18:31:15 Informatics 122 Software Design II Lecture 2 André van der Hoek &
© 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 18:19:12 Informatics 122 Software Design II Lecture 5 André van der Hoek &
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
© 2010 University of California, Irvine – André van der Hoek1June 15, 2015 – 14:08:09 Informatics 122 Software Design II Lecture 4 André van der Hoek &
© 2010 University of California, Irvine – André van der Hoek1June 16, 2015 – 21:42:11 Informatics 121 Software Design I Lecture 7 André van der Hoek &
© 2009 University of California, Irvine – André van der Hoek1June 17, 2015 – 09:17:24 Informatics 122 Software Design II Lecture 6 André van der Hoek &
Design Patterns CS is not simply about programming
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.
© 2010 University of California, Irvine – André van der Hoek1June 25, 2015 – 15:42:49 Informatics 121 Software Design I Lecture 13 André van der Hoek &
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
© 2010 University of California, Irvine – André van der Hoek1June 26, 2015 – 00:06:40 Informatics 122 Software Design II Lecture 6 André van der Hoek &
DESIGN PATTERNS Redesigning Applications And
© 2010 University of California, Irvine – André van der Hoek1June 28, 2015 – 09:26:53 Informatics 121 Software Design I Lecture 12 André van der Hoek &
(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.
© 2009 University of California, Irvine – André van der Hoek1June 29, 2015 – 10:35:56 Informatics 122 Software Design II Lecture 4 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.
(c) 2010 University of California, Irvine – André van der Hoek1July 16, 2015 – 13:45:31 Informatics 122 Software Design II Lecture 8 Nick Lopez Duplication.
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Idioms and Patterns polymorphism -- inheritance and delegation idioms -- realizing.
Design Patterns Alan Shalloway, James Trott, Design Patterns Explained, Addison-Wesley, Gamma, Helm, Johnson, Vlissides, Design Patterns, Elements.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
Patterns 1 Patterns in OO - history 77 - Work of the architect Christopher Alexander 80s - Kent Beck playing with Smalltalk 91 - Gamma’s PhD thesis on.
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.
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Powerpoint Templates Page 1 Powerpoint Templates What is Design Patterns ? by Indriati Teknik Informatika – UB.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
+ Informatics 122 Software Design II Lecture 6 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
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 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
Design Patterns CS 124 Reference: Gamma et al (“Gang-of-4”), Design Patterns.
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
1 Design Patterns Object-Oriented Design. 2 Design Patterns 4Reuse of design knowledge and experience 4Common in many engineering disciplines 4Avoids.
Creational Patterns
Copyright © Active Frameworks Inc. - All Rights Reserved - V2.0Design Pattern Catalog - Page L3-1 PS95&96-MEF-L10-1 Dr. M.E. Fayad Creationa.
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Design Patterns Introduction
BEHAVIORAL PATTERNS 13-Sep-2012 Presenters Sanjeeb Kumar Nanda & Shankar Gogada.
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 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
Software Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
object oriented Principles of software design
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
Informatics 122 Software Design II
CSE 403 Software Design.
Informatics 122 Software Design II
DESIGN PATTERNS : Introduction
Informatics 122 Software Design II
Informatics 122 Software Design II
Informatics 122 Software Design II
Chapter 8, Design Patterns Introduction
Presentation transcript:

(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 Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited.

(c) 2009 University of California, Irvine – André van der Hoek2June 13, 2015 – 21:42:16 Today’s Lecture Design patterns

(c) 2009 University of California, Irvine – André van der Hoek3June 13, 2015 – 21:42:16 Fundamental Principles Apply rigor Separate concerns –modularize –abstract Anticipate change Generalize Work incrementally

(c) 2009 University of California, Irvine – André van der Hoek4June 13, 2015 – 21:42:16 A Checklist on Overall Design Strive for grouping related functionality (high cohesion) Strive for ungrouping semi-related functionality (high cohesion) Strive for reducing interdependency (low coupling)

(c) 2009 University of California, Irvine – André van der Hoek5June 13, 2015 – 21:42:16 A Checklist on Class Design Cohesion Completeness Convenience Clarity Consistency

(c) 2009 University of California, Irvine – André van der Hoek6June 13, 2015 – 21:42:16 A Checklist on Principles and Strategies Principles –keep it simple, stupid! (KISS) –information hiding –acyclic dependencies –… Strategies –program to the interface –refactor –apply software patterns –use aspects –…

(c) 2009 University of California, Irvine – André van der Hoek7June 13, 2015 – 21:42:16 A Checklist on Principles and Strategies Principles –keep it simple, stupid! (KISS) –information hiding –acyclic dependencies –… Strategies –program to the interface –refactor –apply software patterns –use aspects –…

(c) 2009 University of California, Irvine – André van der Hoek8June 13, 2015 – 21:42:16 Design Patterns “Each 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 over, without ever doing it the same way twice” [Alexander, Ishikawa, Silverstein 1977] Pattern –name –problem –solution –consequences

(c) 2009 University of California, Irvine – André van der Hoek9June 13, 2015 – 21:42:16 Software Design Patterns “Descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context” [Gamma, Helm, Johnson, Vlissides 1995] Pattern –name and classification –intent –also known as –motivation –applicability –structure –participants –collaborations –consequences –implementation –sample code –known uses –related patterns

(c) 2009 University of California, Irvine – André van der Hoek10June 13, 2015 – 21:42:16 Patterns Are Designed to Avoid Redesign Creating an object by specifying a class explicitly Dependence on specific operations Dependence on hardware and software platform Dependence on object representations or implementations Algorithmic dependencies Tight coupling Extending functionality by subclassing Inability to alter classes conveniently

(c) 2009 University of California, Irvine – André van der Hoek11June 13, 2015 – 21:42:16 Patterns Apply Two Design Principles Program to an interface, not an implementation –interface should be separately defined, using abstract classes Favor object composition over inheritance

(c) 2009 University of California, Irvine – André van der Hoek12June 13, 2015 – 21:42:16 Original Catalogue of Patterns Purpose CreationalStructuralBehavioral ScopeClassAbstract MethodAdapter (class)Interpreter Template Method ObjectAbstract Factory Builder Prototype Singleton Adapter (object) Bridge Composite Decorator Façade Flyweight Proxy Chain of Responsibility Command Iterator Mediator Memento Observer State Strategy Visitor

(c) 2009 University of California, Irvine – André van der Hoek13June 13, 2015 – 21:42:16 Abstract Method (Creational, Class)

(c) 2009 University of California, Irvine – André van der Hoek14June 13, 2015 – 21:42:16 Abstract Factory (Creational, Object)

(c) 2009 University of California, Irvine – André van der Hoek15June 13, 2015 – 21:42:16 Builder (Creational, Object)

(c) 2009 University of California, Irvine – André van der Hoek16June 13, 2015 – 21:42:16 Adaptor (Structural, Object)

(c) 2009 University of California, Irvine – André van der Hoek17June 13, 2015 – 21:42:16 Composite (Structural, Object)

(c) 2009 University of California, Irvine – André van der Hoek18June 13, 2015 – 21:42:16 Decorator (Structural, Object)

(c) 2009 University of California, Irvine – André van der Hoek19June 13, 2015 – 21:42:16 Proxy (Structural, Object)

(c) 2009 University of California, Irvine – André van der Hoek20June 13, 2015 – 21:42:16 Command (Behavioral, Object)

(c) 2009 University of California, Irvine – André van der Hoek21June 13, 2015 – 21:42:16 Observer (Behavioral, Object)

(c) 2009 University of California, Irvine – André van der Hoek22June 13, 2015 – 21:42:16 State (Behavioral, Object)

(c) 2009 University of California, Irvine – André van der Hoek23June 13, 2015 – 21:42:16 Visitor (Behavioral, Object)

(c) 2009 University of California, Irvine – André van der Hoek24June 13, 2015 – 21:42:16 More… Patterns – – Interaction design patterns – Anti-Patterns – Refactoring – And numerous, numerous, numerous books