Behavioral Patterns (v1)

Behavioral Patterns (v1) - Object-Oriented Desgin...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Desgin Behavioral Patterns George Blankenship 1 CSCI 253 Behavioral Patterns George Blankenship 1 Object Oriented Design: Behavioral Patterns George Blankenship Overview Creational Patterns Singleton Abstract factory Factory Method Pt t Structural Patterns Composite Façade Proxy Behavioral Patterns Chain of Respons. Command Interpreter Behavioral Patterns George Blankenship 2 Prototype Builder Flyweight Adapter Bridge Decorator Iterator Mediator Memento Observer State Strategy Template Method Visitor Pattern Types • Creational Patterns – Focus is the creation of objects (instantiation) – Generally considered at design time • Structural Patterns Focus is the interface between object Behavioral Patterns George Blankenship 3 – Focus is the interface between objects – Does not impact the object itself – Can be used to define a new interface for an existing object or class • Behavioral Patterns – Focus is the communication between objects in the performance of a task – Generally considered at design time
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Desgin Behavioral Patterns George Blankenship 2 Behavioral Patterns •T h e Chain of Responsibility allows increased decoupling between classes by passing a request to a class that may not process the request h e Command provides separation of execution from the invocation h e Interpreter provides inclusion of language elements in a program h e Iterator pattern formalizes the way we move through a list of data Behavioral Patterns George Blankenship 4 The Mediator defines how communication between classes can be simplified by using another class to keep all classes from having to know about each other h e Observer pattern defines the way classes can be notified of a change h e Template pattern provides an abstract definition of an algorithm, and h e State pattern provides a memory for a class’s instance variables h e Strategy pattern encapsulates an algorithm inside a class h e Visitor pattern adds function to a class Chain of Responsibility Pattern: The Problem the chain-of-responsibility pattern is a design pattern consisting of a source of command objects and a series of processing object Each processing object contains a set of - - Behavioral Patterns George Blankenship 5 processing objects . Each processing object contains a set of logic that describes the types of command objects that it can handle, and how to pass off those that it cannot to the next processing object in the chain. Chain of Responsibility: Applicability • More than one handler that can handle a request and there is no way to know which handler to use. The handler must be determined Behavioral Patterns George Blankenship 6 automatically by the chain.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 41

Behavioral Patterns (v1) - Object-Oriented Desgin...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online