Start using Ruby on Rails, Web Services and OAuth

I am running Ruby on Rails 3 and I would like to create an APP1 application that acts as a web service. Then create another RRRR application that can communicate (send / receive information) using APP1 using the OAuth protocol.

What do I need to do to get started (I do not understand programming in these topics, but I read a lot, and I know how they work conceptually / theoretically) ? Is it nice to think in order to implement your own code, or maybe it's better to use a plugin or a gem? Why?

If possible, can you write a TODO list and steps to achieve the goal?

And, more importantly, you can offer me some useful (amazing) resources (e.g. books, blog posts, ...) about creating RoR Web Services

+4
source share
1 answer

Assuming that you decide which web service you need, and RESTful XML Web Service is an acceptable choice, then Rails applications practically do this by default. When you create the forest code, your controller will actually be ready to interact with the RESTful web service.

Of course, this is not all you need to know and do, but the topic seems to be very well covered in the next series of articles ...

Unfortunately, these pages seem to have some JavaScript errors, but they are still usable.

I know this does not answer the OAuth question of your question, but this article ( http://stakeventures.com/articles/2009/07/21/consuming-oauth-intelligently-in-rails ) gives some useful information on this question . Note that the information here is a bit outdated if you use Rails 3 because you will need to list the gems in your Gemfile and run bundle install instead of adding config.gem ... lines to the environment.rb file.

+3
source

Source: https://habr.com/ru/post/1339488/


All Articles