Re: [PEPr] Comment on XML::XML_RPC2
| From: | Greg Beaver | Date: | Tue, 09 Nov 2004 01:06:52 +0000 |
| Subject: | Re: [PEPr] Comment on XML::XML_RPC2 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34264@lists.php.net to get a copy of this message | ||
Davey wrote:
[snip]
My biggest issue is the class extending, for the simple reason that you need to extend different classes for SOAP/XML-RPC/REST and you can only extend *one*. So you need to write three different classes all of a sudden one that extends a class for each types introspection.Sergio: this is part of what I've been railing about :). The amount of debugging triples. It's very important to limit the number of routes that Murphy's Law can appear in the user's code. It's far easier to control bugs in the XML_RPC2 package. The best solution is to allow classes to either extend a base class or implement an interface, not to supply two ways of extending the class. Take a closer look at the original concept at: http://www.chiaraquartet.net/XML_RPC5/RPC5/Interface.phps http://www.chiaraquartet.net/XML_RPC5/RPC5/Server.phps I do not like the large number of methods required by the interface, but this is easily modified.
Introspection should have no effects/changes on the code itself, it should be self contained. With that thought in mind, your ideas just won't work in that "one API fits all" strategy. We would need to write the introspection both for server and client completely independant of the web service.The client does not need any introspection in xml-rpc.
Now, I can modify *my* code to introspect to a WSDL-like data structure pretty easily (heck, right now it goes to WSDL and then is parsed into that data structure) which contains all the information needed: * Class Name * Method Names * Method Arguments * Method Return values * Documentation I've put in all the ground work already, for the most part at least. The fact that WSDL is XML, means its implementation non-specific, and therefore could be used as an internal representation for a web service.WSDL is great, but exceedingly difficult to self-generate from existing code. Until there are more automatic means to generate WSDL from existing code, perhaps using Reflection, there will not be an easy way for developers to do this. Greg P.S. Davey - I would snip more when you bottom-post, it takes more effort than I like to find your interspersed replies :).