Forum: Ruby on Rails More Web Service questions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ff43001ac5fe9805aa6ca2e89d3b7b5d?d=identicon&s=25 Jake Janovetz (janovetz)
on 2006-06-06 15:27
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?

This topic is locked and can not be replied to.