More Web Service questions


Hey folks-

After more research and implementing a simple API, I have a couple

The REST approach has the advantage of including the API directly in the
controller action code to minimize code redundancy. I override the
“to_xml” method in my models so that they produce the correct versions
of XML for the API (i.e. they don’t include extra fields that have no
visibility through the API). Is this a reasonable approach for the REST

SOAP, while potentially suffering from a little bit of redundancy, has
the distinct advantage of separating the API from the web application
itself. While you can say that the application is just another way to
present the API data, I like the separation idea. Any comments on this?

Some sites (like flickr) appear to support both approaches. Is this
common? Is it necessary?

Finally, the Agile book mentions (on page 431) that the Layered
Dispatching method and SOAP may have problems with remote callers behind
proxies because they can strip off the required header. Is this a
significant hurdle? Are proxies that do this common in companies?