Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Design Patterns Card

Design Patterns Card

Ratings: (0)|Views: 81|Likes:
Published by vitorvtb
design patterns
design patterns

More info:

Published by: vitorvtb on Aug 30, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/27/2010

pdf

text

original

 
+visitElementA(in a : ConcreteElementA)+visitElementB(in b : ConcreteElementB)
«interface»
Visitor 
+visitElementA(in a : ConcreteElementA)+visitElementB(in b : ConcreteElementB)
ConcreteVisitor 
+accept(in v : Visitor)
«interface»Element+accept(in v : Visitor)
ConcreteElementA
+accept(in v : Visitor)
ConcreteElementBClient
Visitor 
Type:
Behavioral
What it is:
Represent an operation to beperformed on the elements of anobject structure. Lets you define anew operation without changingthe classes of the elements onwhich it operates.+templateMethod()#subMethod()
AbstractClass
+subMethod()
ConcreteClass
Template Method
Type:
Behavioral
What it is:
Define the skeleton of an algorithm in anoperation, deferring some steps to subclasses.Lets subclasses redefine certain stepsof an algorithm without changing thealgorithm's structure.+execute()
ConcreteStrategyB
+execute()
«interface»
StrategyContext
+execute()
ConcreteStrategyA
Strategy
Type:
Behavioral
What it is:
Define a family of algorithms,encapsulate each one, and make theminterchangeable. Lets the algorithm varyindependently fromclients that use it.+handle()
ConcreteState1
+handle()
«interface»
State
+request()
Context
+handle()
ConcreteState2
State
Type:
Behavioral
What it is:
Allow an object to alter its behavior whenits internal state changes. The object willappear to change its class.-subjectState
ConcreteSubject
+update()-observerState
ConcreteObserver 
+update()
«interface»
Observer 
notifiesobserves
+attach(in o : Observer)+detach(in o : Observer)+notify()
«interface»
Subject
Observer 
Type:
Behavioral
What it is:
Define a one-to-many dependency betweenobjects so that when one object changesstate, all its dependents are notified andupdated automatically.-state
Memento
+setMemento(in m : Memento)+createMemento()-state
Originator Caretaker 
Memento
Type:
Behavioral
What it is:
Without violating encapsulation, captureand externalize an object's internal stateso that the object can be restored to thisstate later.Abstract FactoryCAdapter SBridgeSBuilder CChain of ResponsibilityBCommandBCompositeSDecorator SFacadeSFactory MethodCFlyweightSInterpreter BIterator BMediator BMementoBPrototypeCProxySObserver BSingletonCStateBStrategyBTemplate MethodBVisitor B
Chain of Responsibility
+handleRequest()
«interface»
Handler 
+handleRequest()
ConcreteHandler1
+handleRequest()
ConcreteHandler2Client
successor 
Type:
Behavioral
What it is:
Avoid coupling the sender of a request toits receiver by giving more than one objecta chance to handle the request. Chain thereceiving objects and pass the requestalong the chain until an object handles it.+execute()
ConcreteCommandClient
+action()
Receiver Invoker 
Command
Type:
Behavioral
What it is:
Encapsulate a request as an object,thereby letting you parameterize clientswith different requests, queue or logrequests, and support undoable operations.
+interpret()
«interface»
AbstractExpression
+interpret() : Context
TerminalExpressionClientContext
+interpret() : Context
NonterminalExpression
Interpreter 
Type:
Behavioral
What it is:
Given a language, define a representationfor its grammar along with an interpreter that uses the representation to interpretsentences in the language.
+createIterator()
«interface»
Aggregate
+createIterator() : Context
ConcreteAggregate
+next()
«interface»
Iterator 
+next() : Context
ConcreteIterator 
Iterator 
Type:
Behavioral
What it is:
Provide a way to access the elements of an aggregate object sequentially withoutexposing its underlying representation.
ClientMediator ConcreteMediator ConcreteColleague
«interface»
Colleague
informsupdates
Mediator 
Type:
Behavioral
What it is:
Define an object that encapsulates how aset of objects interact. Promotes loosecoupling by keeping objects from referringto each other explicitly and it lets you varytheir interactions independently.
Copyright © 2007 Jason S. McDonaldhttp://www.McDonaldLand.info
Gamma, Erich; Helm, Richard; Johnson, Ralph; Vlissides, John (1995).
Design Patterns: Elements of Reusable Object-Oriented Software
. Reading, Massachusetts: Addison Wesley Longman, Inc..
+execute()
Command

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->