[Openstreetmap-dev] Re: REST
SteveC
steve at fractalus.com
Tue Jul 19 11:22:00 BST 2005
* @ 19/07/05 11:13:58 AM Nick.Whitelegg at solent.ac.uk wrote:
>
> One question: I know little about REST but would it not require clients of
> OSM to write more code than if XML-RPC was used? i.e. the client would have
> to parse the XML themselves rather than let an XML-RPC library do it for
> them? I can see this could be more flexible but for things like login
> tokens it seems more work for the client.
Yes, and no.
Parsing xml in ruby is terribly simple. Java is a little bit more
complicated, I have no idea what its like in C land.
I would envisage a wrapper to speak to a REST api in the same way as the
java applet currently has a wrapper of the XML-RPC, talking native java
types at one end, and XML-RPC the other.
Also, REST solves a couple of problems - gzip encoding and Unicode. It
also stops the limit on integers we have with XML-RPC where we'd have to
turn every integer (and thus every uid for a node, segment, etc) into a
string and back at each end. You'll still have to of course, but it
won't be as nasty. These are big, big wins.
OTOH, the REST api doesn't _have_ to return xml to you. A simple thing
would be to grep out all the xml tags if you want plain text.
have fun,
SteveC steve at fractalus.com http://www.fractalus.com/steve/
More information about the dev
mailing list