This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the design pattern of transition delegates?  RSS feed

 
shell Johnson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the code of transition delegates in PetStore is very cool. Can anyone tell me what design pattern is this?
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds bit like the Gof4 Behavioral Pattern - command.
 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is different between delegates and proxy?
 
Roman Rytov
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say the both have the same idea - to create an intermediate (and single) point of access to the value services. At this point additional operations maybe carried out. GoF Proxy doesn't specify who is Subject and who is Proxy but BusinessDelegate operates mostly between Business tier (SessionBeans) and fron-end (Web and others). BusinessDelegate maybe implemented either by Proxy or by Adapter strategies. (btw, there's no big difference between Proxy and Adapter sometimes)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!