• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a remote object - pattern

 
Vinod Iyer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers,

which design pattern is used to create a remote object using home interface ?
 
J J Wright
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which design pattern is used to create a remote object using home interface ?


The clue is in the question. Take a look at some creational design patterns and decide which is the closest fit.
 
Vinod Iyer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like your way of answering , you never give answers just give directions !

Even I could boil down to Builder and Factory Method Pattern.

But not able to decide between these two. Factory Method looks a bit closer but not 100% sure
 
Madhavilatha Yeduguri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is Factory pattern.
 
Ryan Fernandes
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use the "Factory Method" of the Home Interface to retrieve a Remote Object (Proxy).

As for the "Builder" Pattern, the implementation of the Home Interface (to create the remote object) should actually use the builder pattern http://en.wikipedia.org/wiki/Builder_pattern, (with all its collaborating objects).. which you may never be able to tell at it is based on the vendor's implementation..

so I'd go with the "Factory Method"
 
Riyaz Enayath
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

'Factory Method' is to suitable to your requirement. It just define the interface for creating remote object and delegate the responsibility to its sub classes to create the objects.

Regards,
MR
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic