File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What Design pattern is this?

 
jay roy
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

From a java class(Action class) we are accessing the business delegate. The code is written in such a way that we are able to access/use only the Business Delegate interfaces and the actual Business Delegate implimentation is hidden behind the Business Delegate interfaces. The main objective of the Business Delegate implimentation is to get a remote object(EJB object).

Any idea, what Design pattern does the above statement represents?


thanks
jtc

[ November 25, 2006: Message edited by: Jhumri Talaiyah Charsobees ]
[ November 26, 2006: Message edited by: Jhumri Talaiyah Charsobees ]
 
Henrique Ordine
Ranch Hand
Posts: 128
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jhumri,

If your abstraction is separeted from your implementation in a way that the two can vary independently, than that's the Bridge pattern.
 
Henrique Ordine
Ranch Hand
Posts: 128
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry.

...then that's the Bridge pattern.
 
jay roy
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the response.
so i was thinking if there is any way bridge pattern and business delegate patern are related to each other

thanks
J
 
Jeevan Philip
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using Business Delegatepattern! Bridge pattern is not used for implementing interfaces. Just look at the definition of Bridge, it clearly says, when abstraction can change independent of implementation. Can we change the interface here and expect the implementation to work or vice versa?

Splitting abstraction and implementation is just a good OOD practice. Not a pattern. However certain patterns like Strategy etc uses this practice.

Jeevan.
 
Henrique Ordine
Ranch Hand
Posts: 128
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jhumri,

I don't think so, the two should be implemented to solve different problems. What I'm saying is, if your implementing you business delegate in a way that the interface and the implementation can vary without affecting one another, then you're using the Bridge pattern to implement your Business Delegate. But the Business Delegate is suppose to serve a very different purpose.
 
jay roy
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
very well said henrique,

thanks guys for the responces
Greatly appreciate it
J
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic