Hi, I want to write APIs for my rails 3.1 application but have never written an API ever. I am supposed to write REST and SOAP APIs. Is there a formal book or e-book or screencasts or tutorials which teaches about APIs in Rails and best practices? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I suggest you to read Rails 3 in Action book written by Ryan Bigg and Yehuda Katz. On Wed, Oct 12, 2011 at 12:37 AM, UA <ritvij.j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I want to write APIs for my rails 3.1 application but have never > written an API ever. I am supposed to write REST and SOAP APIs. Is > there a formal book or e-book or screencasts or tutorials which > teaches about APIs in Rails and best practices? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Get yourself a copy of Service Oriented Design with Ruby and rails Read through this: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm and read this: http://blog.steveklabnik.com/2011/07/03/nobody-understands-rest-or-http.html Make sure that you support oauth2 if you need security. I had some success with this gem here: https://github.com/flowtown/rack-oauth2-server In general I believe it is better to create a Sinatra rack app as part of your rails app that exposes the API, much cleaner that way. Use Json as the default transport. As for Soap... avoid it like the plague if you can. On Tue, Oct 11, 2011 at 8:36 PM, Roy Situmorang <roy.situmorang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> I suggest you to read Rails 3 in Action book written by Ryan Bigg and > Yehuda Katz. > > > On Wed, Oct 12, 2011 at 12:37 AM, UA <ritvij.j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hi, I want to write APIs for my rails 3.1 application but have never >> written an API ever. I am supposed to write REST and SOAP APIs. Is >> there a formal book or e-book or screencasts or tutorials which >> teaches about APIs in Rails and best practices? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
check out ActiveResource too -- http://railscasts.com/episodes/94-activeresource-basics On Wed, Oct 12, 2011 at 11:48 AM, Martin Wawrusch <martin-qs6+VQBngv1Wk0Htik3J/w@public.gmane.org>wrote:> Get yourself a copy of Service Oriented Design with Ruby and rails > > Read through this: > http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm > and read this: > http://blog.steveklabnik.com/2011/07/03/nobody-understands-rest-or-http.html > > Make sure that you support oauth2 if you need security. I had some success > with this gem here: https://github.com/flowtown/rack-oauth2-server > > In general I believe it is better to create a Sinatra rack app as part of > your rails app that exposes the API, much cleaner that way. Use Json as the > default transport. > > As for Soap... avoid it like the plague if you can. > > On Tue, Oct 11, 2011 at 8:36 PM, Roy Situmorang <roy.situmorang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> I suggest you to read Rails 3 in Action book written by Ryan Bigg and >> Yehuda Katz. >> >> >> On Wed, Oct 12, 2011 at 12:37 AM, UA <ritvij.j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> Hi, I want to write APIs for my rails 3.1 application but have never >>> written an API ever. I am supposed to write REST and SOAP APIs. Is >>> there a formal book or e-book or screencasts or tutorials which >>> teaches about APIs in Rails and best practices? >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.