Re: Re: [PEPr] -1 for XML::XML_RPC2

From: Date: Tue, 17 May 2005 15:05:57 +0000
Subject: Re: Re: [PEPr] -1 for XML::XML_RPC2
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37695@lists.php.net to get a copy of this message
Sergio Carvalho wrote:
Alan Knowles wrote:
This jumps out an shouts 'factory method here'... 'binarydata' => XML_RPC2::valueFactory('base64',$data); you can have all your class's representing the objects, and dont have to bother the user generally with their details.. Regards alan
True, true. In hindsight it's perfectly obvious: A Factory method allows for the classes to be used to define the types, but the underlying implementation to be procedural (as is the case with the xmlrpc extensions and their setType function). I'd implement this with a factory method per class: XML_RPC2_Value_Base64::create but won't mind providing a shortcut method in XML_RPC2_Value (there's no XML_RPC2 base class). I'll summarize (once again) changes to XML_RPC2, after I get to analyze the profiling data in the basis of Greg's yesterday post. If I'm not forced to go with the setType solution, I'll change the API.
Common ground? :) I prefer the factory as well, but don't think we need to go so far as to be procedural underneath in the PHP extension, I would just like to see the factories only used by the end-user to specifically control output rather than by the underlying implementation. Greg

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