Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail From: Alex Rothbard Newsgroups: comp.lang.ruby Subject: Re: Seeking advice Date: Tue, 5 Apr 2011 13:30:52 -0500 Organization: Service de news de lacave.net Lines: 24 Message-ID: References: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1302028276 65129 65.111.164.187 (5 Apr 2011 18:31:16 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Tue, 5 Apr 2011 18:31:16 +0000 (UTC) In-Reply-To: X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 381022 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:2361 The factory design pattern is sort of what I want, but not exactly. Remember that there are three different classes (services) that need to take advantage of a transport. The library is broken down like this: There is a high level class that represents a user's overall account. The user uses this class only. This account class needs to access three different "services" (classes): the grid, the archive, and the transaction service. All three services need to communicate with the remote server using a transport. In the example above, the transport is providing methods for accessing the grid, but I am thinking of it in another way: the grid/archive/transaction classes should provide methods which correspond to the API on the remote server, and those classes then use the selected transport to send it across. In short, I have a server library which offers up three sets of APIs (one for each service), and I want to be able to allow the end user to easily choose which transport the client library uses when accessing these services. -- Posted via http://www.ruby-forum.com/.