Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.

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.
DESIGN PATTERNS OZGUR RAHMI DONMEZ.
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
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.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
CERN – European Organization for Nuclear Research GS Department – Administrative Information Services Design Patterns in Groovy Nicolas Décrevel Advanced.
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Idioms and Patterns polymorphism -- inheritance and delegation idioms -- realizing.
Design Patterns Standardized Recurring model Fits in many location Opposite of customization Fundamental types of pattern Choose and use as desired and.
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.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
CSSE 374: 3½ Gang of Four Design Patterns These slides derived from Steve Chenoweth, Shawn Bohner, Curt Clifton, and others involved in delivering 374.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
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.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
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.
Methods: Deciding What to Design In-Young Ko iko.AT. icu.ac.kr Information and Communications University (ICU) iko.AT. icu.ac.kr Fall 2005 ICE0575 Lecture.
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Design Pattern Dr. Zhen Jiang West Chester University url:
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
1 Design Patterns Object-Oriented Design. 2 Design Patterns 4Reuse of design knowledge and experience 4Common in many engineering disciplines 4Avoids.
Creational Patterns
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.
DESIGN PATTERNS -BEHAVIORAL PATTERNS WATTANAPON G SUTTAPAK Software Engineering, School of Information Communication Technology, University of PHAYAO 1.
Proxy.
CreditCardManagementHost Design patterns John Lin.
DESIGN PATTERNS COMMONLY USED PATTERNS What is a design pattern ? Defining certain rules to tackle a particular kind of problem in software development.
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.
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha.
© 2011 Autodesk Popular Design Patterns and How to Implement Them in.NET Gopinath Taget Senior Developer Consultant.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Stephenson College DP 98 1 Design Patterns by Derek Peacock.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Design Patterns Introduction
Design Patterns SE464 Derek Rayside images from NetObjectives.com & Wikipedia.
Java Design Patterns Java Design Patterns. What are design patterns? the best solution for a recurring problem a technique for making code more flexible.
Interface Patterns. Adapter Provides the interface a client expects, using the services of a class with a different interface Note Avoid using object.
CSE 332: Design Patterns (Part II) Last Time: Part I, Familiar Design Patterns We’ve looked at patterns related to course material –Singleton: share a.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
PROTOTYPE. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract factory.
7 April 2004CSci 210 Spring Design Patterns 2 CSci 210.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
The Object-Oriented Thought Process Chapter 15
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
MPCS – Advanced java Programming
Common Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
How to be a Good Developer
Design Patterns with C# (and Food!)
object oriented Principles of software design
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
How to be a Good Developer
How to be a Good Developer
Design Patterns in Game Design
Design Patterns Part 2: Factory, Builder, & Memento
Informatics 122 Software Design II
Chapter 8, Design Patterns Introduction
CIS 644 Tues. Nov. 30, 1999 W15A … patterns.
Chapter 8, DesignPatterns Facade
Presentation transcript:

Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03

Pattern’s both side Good sides: help management way Downsides: going to create more class with don’t know.

3 categories Creational Structural Behavioral There are more than 23 pattern: MVC…

Copyright {c} 2014 by the McGraw-Hill Companies, Inc. All rights Reserved Situation Specific Patterns Creational Patterns Abstract factory Builder Factory method Prototype Singleton Structural Patterns Adapter Bridge Composite Decorator Facade Flyweight Proxy Behavioral Patterns Chain of responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template method Visitor

I. Creational 1. abstract factory Many family of codes can categories into many categories. E.g. two family belong to factory and the output is produce product. 16-5

I. Creational 2. builder To build sth or construct sth which is complex and compose tiny product. Combine product into one and process is similar When client request, director get request, each builder build one product which compose many tiny product.

I. Creational 3. factory method Group product into one Based on parameter/ type Client ask give me “cat”(parameter) Same parameter will get same product Animal CatDog

I. Creational 3. prototype Refer to original one to build Construction is complex; therefore; don’t build from beginning(mean build only once.) Help change/ want to make change 1.Shallow clone: same as original, new and original both change. 2.Deep clone: create prototype, clone all relationship. New change & keep original(copy on write)

I. Creational 4. singleton Create thing at most one (0…1) Make sth Do sth 1.Abstract factory’s sub class could be singleton 2.Combine with Builder 3.Combine with template

II. Structural 1. adapter Often see adapter in the world We need data from system, but format will be different. We need to create new interface to extract existing system and combine with user. Adapter make system compatible Class adapter: only one Object adapter: more than one, flexible

II. Structural 2. bridge Both side(abstract & implementation) to communicate each other Choose which one to implement == choose which one to marry

II. Structural 3. composite We want to compose sth Leaf: terminal and smallness one Component: has leaf Composite: has instance Data structure: recursive, combine Know how to decompose

II. Structural 5. decorator Decorate something we have based/plain/no decoration class, and want to put sth on it. Flexible to add sth we need on it Decorator is abstract Component is interface decorator-pattern.html decorator-pattern.html

II. Structural 5. façade Singleton Know each component will feedback to you

II. Structural 6. flyweight You need to create 1000 object(all the same) Check out the pool(unique in pool) Intrinsic(constant): save in memory, reuse many times Extrinsic: we will not save.(at client…) stateless

II. Structural 7. proxy Surrogate of real one, take place of real one. Representative of real one, in place of real one Placeholder Purpose: 1.Protect: need to know user(define first) to authorize, give key to user 2.Virtual proxy: consume a lot of time, if request yes→ display, no→create 3.Remote proxy:SOA 4.Smart proxy: when user want to access sth, count how many times real one is asked, if nobody ask then free the memory.

III. Behavioral 1. chain of responsibility Naming is important Each component on chain have responsibility to do sth Define first one and successor(predecessor) E.g. We have 5 handler on chain, give one problem for them, pass the problem until solve problem, other is exception. Our design not be solve all problem.

III. Behavioral 2. command Create sth and object behave Invoker group all command Command execute, if is receiver A, go with A Undo command(not unlimited)

III. Behavioral 3. interpreter Have rule, grammar to perform sth We can get data based on grammar Input> rule: parse / segment / format analyze > output

III. Behavioral 4. iterator Traverse sth, want to display or save in different Database We don’t want to expose structure, but we want to do structure Template: if you have next one, then do sth.

III. Behavioral 5. mediator Coordinator to reduce communication E.g. stock market Observer: stock market change, notify user

III. Behavioral 6. memento We have object when someone need previous versions, ask caretaker to get Originator Memento

III. Behavioral 7. observer Subject is a content, observer subscribe sth. Many observer interesting one target(1..many) Object change, notify subscriber Reactor design pattern: (*…*) (many…many)

III. Behavioral 8. state Class is active, many status define next state

III. Behavioral 9. strategy Client can select strategy same text different encryption(algorithm perform differently)

III. Behavioral 10.template method Boil> Fried Don’t call us, we’ll can you(hollywood principle)

III. Behavioral 11.visitor Knock your door, don’t expose structure. Use iterator to traverse different structure Composite: to segment leaf(knock the leaf) If you have lot of operation differently High cohesion Want to format sth, display it

16-28 Process for Applying Patterns

16-29 Case Study: Design a State Diagram Editor

reference 16-30