aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes What Design pattern is this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "What Design pattern is this?" Watch "What Design pattern is this?" New topic
Author

What Design pattern is this?

jay roy
Ranch Hand

Joined: Nov 16, 2006
Posts: 145
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

Joined: Sep 03, 2004
Posts: 127
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.


J2EE Architect/Developer
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Sorry.

...then that's the Bridge pattern.
jay roy
Ranch Hand

Joined: Nov 16, 2006
Posts: 145
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

Joined: Nov 17, 2006
Posts: 41
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

Joined: Sep 03, 2004
Posts: 127
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

Joined: Nov 16, 2006
Posts: 145
very well said henrique,

thanks guys for the responces
Greatly appreciate it
J
 
jQuery in Action, 2nd edition
 
subject: What Design pattern is this?