Re: UPS Package

From: Date: Tue, 30 Nov 2004 12:26:53 +0000
Subject: Re: UPS Package
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34658@lists.php.net to get a copy of this message
Justin Patrin wrote: >On Mon, 29 Nov 2004 17:44:21 +0100, Stephan Schmidt <schst@php-tools.net> wrote: >> Hi, >> >> bertrand Gugger schrieb: >> >> > So, what is with services not in America. >> > Should not the concept be open to more general parcel ("packages") service. >> > "packages" as I was not sure what package meant in Tim's original >> > message. >> > Anyway, a few pear packages are allready some kind of regional... >> UPS is *not* regional, they are quite commen in Germany as well. I would >> not encourage anyone to write a unified API for parcel services, like >> UPS, FedEx, DPD, etc. They offer different services, using different >> protocols and authentication mechanisms. Trying to unify this, well make >> the package a lot more complicated. >> > >I have to disagree. Having a unified method of accessing rates would >be very nice. I've already made my own quick and dirty packages for >UPS, USPS, and FedEx and at least the rate services are very similar. >IMHO this would be a great place to unify and have a factory kind of >system. I agree. If the package is PHP5, you could define an interface. If the package is not PHP5 yet, you could define an abstract class to extend upon. Having a common API would make it easier to query multiple services in a business application. The common public interface should not be too complex to define. But a driver based API à la DB would be too bloated, IMO. A package like this would definately be a nice addition to PEAR. I suggest Services_Transport_Rates, Services_Transport_Rates_UPS, Services_Transport_Tracking, Services_Transport_Tracking_UPS but I am open to other suggestions. Bertrand Mansion Mamasam

« previous php.pear.dev (#34658) next »