Start using Ruby on Rails, Web Services and OAuth

前端 未结 1 457
抹茶落季
抹茶落季 2021-02-06 15:10

I am running Ruby on Rails 3 and I would like to create an application APP1 that acts as a Web Service. Then create another RoR application APP2 that

相关标签:
1条回答
  • 2021-02-06 15:45

    Assuming you get to decide what kind of Web Service you want, and a RESTful XML Web Service is an acceptable choice, then Rails applications practically do this by default. When you generate scaffolding code, your controller will actually be ready to interface with as a RESTful Web Service.

    Of course, that's not everything you need to know and do, but the subject seems to be covered very well by the following series of articles...

    1. http://css.dzone.com/news/rest-with-rails-part-1
    2. http://css.dzone.com/news/rest-with-rails-part-2-serving
    3. http://css.dzone.com/news/rest-with-rails-part-iii-using

    Unfortunately, there seem to be some JavaScript errors on those pages, but they're still usable.

    I know this doesn't answer the OAuth part of your question, but this article ( http://stakeventures.com/articles/2009/07/21/consuming-oauth-intelligently-in-rails ) apears to have some useful information on that subject. Note that the info here is slightly out of date if you'll be using Rails 3 because you'll want to list the gems in your Gemfile and run bundle install rather than adding config.gem ... lines to your environment.rb file.

    0 讨论(0)
提交回复
热议问题