Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UML Representation for design pattern

 
Tanuja rj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which two design pattern has same representation of UML?
Thanks in Advance
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to know?

What are you seeking?
 
Tanuja rj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know when we draw UML representation for design pattern which two design pattern shows same UML representation?
 
Lutz Hankewitz
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can model it as Collaboration
UML 2.1 Specifiation

Chapter 9.3.3 Collaboration - page 171

There is also an example there with the observer pattern.

Kind regards

Lutz
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tanuja,

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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic