Hello all: As I am going through Ruby on Rails for the first time I would appreciate some clarifications from the gurus. I am new and I am bit confused by the following conceptions that I have gathered myself by reading blogs etc.. 1. Active Resource makes it super easy to serve REST based services i.e. XML to anyone, i.e. its acts as REST Server Side application. Correct? Bottom line I can serve XML to others .. 2. Active Resource also can be used to "consume" XML service i.e. act as a client. Now so far I have seen examples and all of them are consuming Rails based applications XML i.e. Active Resource REST Server Side --- > Another rails app Active Resource clients. So far so good? no? Now can you consume XML from 3rd party i.e Amazon? Ebay etc? using Active Resource client? I have seen no blog post or any example of such .. nada.. Why can you not do this? and why would one do this? Can one define Active Resource is just a protocol so that rails app can talk to each other? 3. What is the story with Action WebService? As I understand you have the tools/libs here so you can make a SOAP client or XML-RPC client or Server, I gues you can do REST too. What I wonder was - why would anyone make Active Resources when you can just beef up the current Action WebService? 4. Most of the example I have seen for consuming XML or Webservices i.e. 3rd party web service are coming directly out of Ruby libs Hpricot, Machanize, REXML etc, etc.. and then you also have bundles of gem that just do amazon, or yahoo or ebay what not. This I understand and grasp cos its like other programming language.. I think I am probably lost either in terminology.. my interest is what is the best way of consuming i.e. -- whatever XML Ebay or corporation X or intranet Y produce? Why? pros and cons? I am interested to more of convention rather then which lib is fast cos every lib has its plus and minus.. Making my service available in XML to others also is interest of mine and same here looking for convention Am I completely lost? or ? Could someone please explain.. Thanks again!
on 2007-01-10 01:18
on 2008-10-20 03:44
I was just looking for the same advice too :)