CSE 432: Course Summary Course Summary: CSE 432 25 specific GoF/PH design patterns’ structure & content How requirements, design forces, and patterns interact.

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 OZGUR RAHMI DONMEZ.
Chapter 6: Using Design Patterns
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.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Design Patterns Ref : Chapter 15 Bennett et al. useful groups of collaborating classes that provide a solution to commonly occuring problems. provide.
Pattern Myths1 Ten Design Pattern Myths Jim Fawcett condensed from Pattern Hatching, John Vlissides, Addison-Wesley, 1998.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Idioms and Patterns polymorphism -- inheritance and delegation idioms -- realizing.
 A set of objectives or student learning outcomes for a course or a set of courses.  Specifies the set of concepts and skills that the student must.
Programming With Java ICS201 University Of Hail1 Chapter 12 UML and Patterns.
Application of Pedagogic Patterns to the Design of Distance Learning Materials Steve Wade University of Huddersfield.
Design Dan Fleck CS 421 George Mason University. What is the design phase? Analysis phase describes what the system should do Analysis has provided a.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
CSE 332: Design Patterns (Part I) Introduction to Design Patterns Design patterns were mentioned several times so far –And the Singleton Pattern was discussed.
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
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
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.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 6: Using Design Patterns.
Computing IV Singleton Pattern Xinwen Fu.
Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.
CSE 403 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
CSE 432: Design Patterns Introduction What’s a Pattern? What’s an Idiom? According to Alexander, a pattern: –Describes a recurring problem –Describes the.
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.
Structural Design Patterns
ECE450S – Software Engineering II
Introduction to Design Patterns Part 1. © Lethbridge/Laganière 2001 Chapter 6: Using design patterns2 Patterns - Architectural Architectural Patterns:
Understanding and using patterns in software development EEL 6883 Software Engineering Vol. 1 Chapter 4 pp Presenter: Sorosh Olamaei.
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.
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
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.
Design Pattern. Definition: A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 6: Using Design Patterns.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
Design Patterns Introduction
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
CSE 332: Design Patterns Introduction to Design Patterns You’ve seen design patterns several times this semester –The Iterator pattern has been discussed.
CSE 432: Thanks for the memory leaks, Pushme-Pullyu, and Command Summary of “Thanks for the Memory Leaks” “Left-over” design forces from Type Laundering.
Duke CPS Programming Heuristics l Identify the aspects of your application that vary and separate them from what stays the same ä Take what varies.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
The Object-Oriented Thought Process Chapter 15
Design Patterns (Chapter 6 of Text Book – Study just 8)
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
Software Design Patterns
MPCS – Advanced java Programming
Design Patterns Lecture part 2.
Introduction to Design Patterns
Behavioral Design Patterns
Design Patterns with C# (and Food!)
object oriented Principles of software design
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Introduction to Design Patterns Part 1
PH Chapter 3 Thanks for the Memory Leaks Pushme-Pullyu (pp
Presentation transcript:

CSE 432: Course Summary Course Summary: CSE specific GoF/PH design patterns’ structure & content How requirements, design forces, and patterns interact Understanding pattern similarities and differences –Adapter vs. Bridge, Strategy vs. Template Method –Mediator vs. Observer, Mediator vs. Façade) Using patterns in specific design scenarios –Chapters 2, 3 in the Pattern Hatching text –A number of (sometimes common) cases in your projects –A good way to build design intuition, remember applicability Pattern combinations lead to small pattern languages –E.g., Command + memento + strategy (undoing commands) –E.g., Composite + iterator + visitor (modify a structure) –Record combinations you find useful, for future reference

CSE 432: Course Summary Design Pattern Characteristics and Use A pattern has a name –e.g., the Command pattern A pattern documents a recurring problem –Design forces that constrain the solution space –e.g., Issuing requests to objects without knowing in advance what’s to be requested or of what object A pattern is applied in a design context –Other criteria and details that shape design decisions –Other design forces that constrain the solution space A pattern describes the core of a solution –e.g., class roles, relationships, and interactions –Important: this is different than describing a design A pattern considers consequences of its use –Trade-offs, unresolved forces, other patterns to use

CSE 432: Course Summary Simple Pattern Form Example: “Singleton” Problem –Want to ensure a single instance of a class, shared by all uses throughout a program Context –Need to address initialization versus usage ordering Solution –Provide a global access method (e.g., via a static member function in C++) –First use of the access method instantiates the class –Constructors for instance can be made private Consequences –Object is never created if it’s never used –Object is shared efficiently among all uses

CSE 432: Course Summary Pattern-Oriented Software Design & Development We’ve looked at a lot of patterns’ details this semester –23 (GoF) + 2 (PH) Design Patterns –Including Generation Gap, Typed Message However, larger ideas they embody are what matter –Patterns capture reusable design expertise –Patterns bridge between requirements and design –Patterns interact with other patterns non-trivially –Good pattern combinations yield solid designs –Unsuccessful combinations leave forces unresolved –As a design evolves, forces and patterns change

CSE 432: Course Summary Requirements  Design Forces  Patterns Requirements are declarative –what your software will do, provide, etc. –the way in which your software will do something –E.g., support different games’ collections of cards Design forces are descriptive and prescriptive –Identify circumstances/issues to be considered –Constrain set of designs within a concrete context –Requirements, other patterns shape the context Patterns are normative and generative –Resolve design forces in standardized ways –Have consequences that may then need resolution –Guide toward a single design, but don’t specify it

CSE 432: Course Summary Scenarios are Guides to Pattern Use: E.g., Undo Client performs action, undo stack remembers Undo call executes top command on stack Command restores previous state (LIFO) UndoCommandUndoStackClientSystem / construct store executerestore time action remember undo

CSE 432: Course Summary Patterns are Made to be Combined Diagram below is from the “Pattern Hatching” text, page 29 –Node class plays roles in both of the patterns, joins them –Component role in Composite, Subject role in Proxy Such “Alexandrian Density” can have both good and bad implications –Resolution of multiple concerns (elegant) vs. tangling of concerns (brittle)

CSE 432: Course Summary Pattern Combinations  Mini Pattern Languages Some operations don’t have a closed form inverse Memento can remember state prior to command use Strategy supports both kinds of Command inverses UndoCommandUndoStackClientSystem / construct store executerestore time action remember undo

CSE 432: Course Summary Re-Read Pattern Hatching and GoF Repeatedly GoF text introduces patterns, provides a detailed reference –A useful index into the patterns is found inside the front cover Not only what pages they’re on, but brief snippets summarizing intent –Pattern map inside back cover is also helpful Remembering the relationships between patterns (add your own arcs) PH chapter 2 gives a nice sequence of “teaching examples” –Patterns are motivated and applied in a fairly controlled way –Straightforward progression for introducing others to how patterns work –Useful as a guide to basic principles of pattern-oriented design PH chapter 3 is a bit messier, more like “real-world” examples –E.g., “Left-over” design forces from Type Laundering example Need to avoid leaking dynamically created cursors Cannot predict when clients will obtain/release them –Solutions may involve design idioms (narrower applicability) and design heuristics (somewhat less codified/standard) as well as other patterns E.g., handle-body, reference counting idioms

CSE 432: Course Summary Understand Pattern Authorship PH chapter 1 gives a nice justification for what pattern-oriented design is (and is not) and for why to invest in learning to do it (and possibly to teach it and/or contribute to its literature) PH chapter 4 is a look inside the process of authoring patterns –Sometimes a bit like learning how law or sausage is made ;-) –The style of argument and the questions raised are very useful, though –Especially to build your judgment and intuition in applying patterns PH chapter 5 offers concise advice for pattern authors/users –Hard won lessons from the kinds of experiences in PH chapter 4 –Also applicable to developing/justifying designs as well as patterns –Also applicable to other forms of writing and communication

CSE 432: Course Summary Concluding Remarks Design is an essential development stage –After requirements, but before implementation –Worth splitting into high and low level stages –Worth detailed discussion, justification, iteration Studying (and writing) patterns is beneficial –Gives designers a higher level vocabulary “Both Façade and Interpreter can decouple subsystems” –Can be incorporated into many methodologies We’ve done a combination of XP and spiral development – Supports justified reuse of design information Among designers/developers of all levels of expertise

CSE 432: Course Summary Thanks Mastery is a path, not a destination –George Leonard “…if you only walk long enough.” –Lewis Carroll I have learned a lot from our discussions, and I hope you have gained as much from them as well. Last but not least, please fill out your on-line course evaluations (by May 3 rd ) if you’ve not done so already: