Re: Re: Package proposal: Payment_Exchange
| From: | Marshall Roch | Date: | Thu, 28 Aug 2003 01:10:40 +0000 |
| Subject: | Re: Re: Package proposal: Payment_Exchange | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20702@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
I'd turn the thing into a factory patern - defaulting to euro central bank.I've never even heard of "factory patterns" before. I just looked quickly on Google and found something[1] describing "abstract factory patterns" using PEAR DB as an example, talking about how you call DB::connect('mysql') and it creates a DB_mysql object. Is that what you're referring to? How would more drivers be installed? I see this as a good use of subpackages. If someone wanted to write a driver for 'mybank,' but 'mybank' was an Access database (I found some of those), then you'd probably want to add a dependency on DB.
Imagine in Asia or the US - it's going to be alot better to query a local source... (which may provide the data in a different format)I'm in the US and the speeds aren't bad across my host's dual-OC12s, but I agree and will work on that. :)
Someone may want to write a driver to do factory('mybank') and get real rates....What do you mean by "real rates"? -- Marshall Roch [1] http://www.horde.org/papers/kongress2002-design_patterns/8_abstractfactory.xml.html