There is also an example there with the observer pattern.
Kind regards
Lutz
Hong Anderson
Ranch Hand
Joined: Jul 05, 2005
Posts: 1936
posted
0
Originally posted by Tanuja Virle: I want to know when we draw UML representation for design pattern which two design pattern shows same UML representation?
I mean why you want to know? Or you just want to know?
In the GoF's Patterns, you'll see that Strategy and State have exactly the same class diagram.
They differ in their intent: Strategy is a "flexible alternative to subclassing". It allows you to change the behavior dynamically with composition. State is "an alternative to putting lots of conditionals in your context". It encapsulate behaviors in State objects that can be changed dynamically.
Hope it helps,
Beno�t
SCJP5 | SCBCD5 | SCEA5 Part 1
Tanuja rj
Greenhorn
Joined: Aug 18, 2008
Posts: 10
posted
0
Benoît de Chateauvieux wrote:
In the GoF's Patterns, you'll see that Strategy and State have exactly the same class diagram.
They differ in their intent:
Strategy is a "flexible alternative to subclassing". It allows you to change the behavior dynamically with composition.
State is "an alternative to putting lots of conditionals in your context". It encapsulate behaviors in State objects that can be changed dynamically.
Hope it helps,
Beno�t
Tanuja rj
Greenhorn
Joined: Aug 18, 2008
Posts: 10
posted
0
Benoît de Chateauvieux wrote:
In the GoF's Patterns, you'll see that Strategy and State have exactly the same class diagram.
They differ in their intent:
Strategy is a "flexible alternative to subclassing". It allows you to change the behavior dynamically with composition.
State is "an alternative to putting lots of conditionals in your context". It encapsulate behaviors in State objects that can be changed dynamically.
Hope it helps,
Beno�t
Tanuja rj
Greenhorn
Joined: Aug 18, 2008
Posts: 10
posted
0
Kengkaj Sathianpantarit wrote:
I want to know when we draw UML representation for design pattern which two design pattern shows same UML representation?
I mean why you want to know? Or you just want to know?
Tanuja rj
Greenhorn
Joined: Aug 18, 2008
Posts: 10
posted
0
Kengkaj Sathianpantarit wrote:
I want to know when we draw UML representation for design pattern which two design pattern shows same UML representation?
I mean why you want to know? Or you just want to know?