[Phpwm] SOAP/XMLRPC/ Web services question

Elliot Smith elliot at townx.org
Mon Apr 7 23:21:24 BST 2008


Sorry, David, one point I meant to make but forgot:
>
> David Goodwin wrote:
>> Thanks! I'm still not clear on what the difference between them is 
>> though. Why REST and not XMLRPC? Do more 'clients' support XMLRPC 
>> than REST (or vice versa).
I see the chief difference between XML-RPC and REST as pivoting around 
how you view your applications:

- REST implies you look for resources in your application to be exposed 
as "objects" (nouns) at URIs: this works best for items, catalogues, 
orders, people. Actions on those objects are implicit in the HTTP method 
you invoke (PUT, POST, GET, DELETE) and parameters you pass.

- XML-RPC tends more to the procedural, service-based perspective 
(verbs): call, invoke, transform, place-order, get-item. Objects and the 
actions they act on are encapsulated in the request body and sent to a 
more generic "service" endpoint.

I also have a few conceptual difficulties with batching operations in 
REST - it seems more natural to operate on a single type of collection 
or a single item at a time in REST. Meanwhile, XML-RPC seems a better 
fit for batching together a whole load of operations on different 
objects, and bundling them into a single request/method call. If you 
want to save network bandwidth, XML-RPC might make more sense.

I think there's room for both. The choice might boil down to whether you 
think in objects (REST) or procedures (XML-RPC)...

Elliot



More information about the Phpwm mailing list