HighDots Forums  

Web Services

Ruby On Rails Talk Ruby On Rails programming language mailing list


Discuss Web Services in the Ruby On Rails Talk forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steven Elliott Jr
 
Posts: n/a

Default Web Services - 11-04-2009 , 09:24 AM






Hello,

Has anyone had to write a web service in Rails? If so, I'd love to get
some information from you as to where to begin.

I have recently started introducing Rails into the enterprise at my
office. It has been met with some hesitation by the older developers
(all using .NET). Anyway, a requirement came up to write some web
services that allow another web company to consume certain
information. Basically i need to set up a registration service for
members and then a log in service where we can authenticate users...
we'll be storing the credentials on our side.

Basically it breaks down like this:

Registration
other company will pass last 4 of SSN,
Zip code,
Email Address,
Password
Our Response
Already registered (boolean): true if already registered, false
if not
if registered
the registered email address (string)
the registered password (string)
other company can then use these to send them a forgot
password email

Login
other company will pass
email (string)
password (string)
Our response
allowed (boolean)
other information...

We're storing all of our data on SQL Server 2008 but that's not a big
issue. I wanted to be able to show Rails' capability of quickly and
easily handling this standard enterprise requirement. I'd love to hear
some thoughts from anyone who has done this type of thing before. I am
really trying to avoid using Windows Communication Foundation for this
type of thing. I was thinking just a very SOAP type of thing would be
the best approach.

Thanks!
Steve
--~--~---------~--~----~------------~-------~--~----~
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 (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #2  
Old   
bill walton
 
Posts: n/a

Default Re: Web Services - 11-04-2009 , 02:09 PM






Hi Steve,

On Wed, 2009-11-04 at 06:24 -0800, Steven Elliott Jr wrote:

Quote:
Has anyone had to write a web service in Rails? If so, I'd love to get
some information from you as to where to begin.
<snip>

Quote:
I was thinking just a very SOAP type of thing would be
the best approach.
I'd recommend starting with "RESTful Web Services" by Leonard Richardson
and Sam Ruby, published by O'Reilly.

Rails today has a very strong preference for REST over SOAP when it
comes to Web Services. Having experience with both, I can say without
equivocation that REST is the way to go if you can. If you can't, use
the plugin at http://agilewebdevelopment.com/plugins/action_web_services

HTH,
Bill


--~--~---------~--~----~------------~-------~--~----~
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 (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #3  
Old   
Steven Elliott Jr
 
Posts: n/a

Default Re: Web Services - 11-04-2009 , 02:39 PM



Hi Bill,

Thanks for the email. Ya I am looking into RESTful now thinking that might
be the way to go. There is not too much on the web out there but I saw a
book from Apress "Practical Rest On Rails 2" I am thinking of taking a look
at that.

Thanks again,
Steve

On Wed, Nov 4, 2009 at 2:09 PM, bill walton <bwalton.im (AT) gmail (DOT) com> wrote:

Quote:
Hi Steve,

On Wed, 2009-11-04 at 06:24 -0800, Steven Elliott Jr wrote:

Has anyone had to write a web service in Rails? If so, I'd love to get
some information from you as to where to begin.

snip

I was thinking just a very SOAP type of thing would be
the best approach.

I'd recommend starting with "RESTful Web Services" by Leonard Richardson
and Sam Ruby, published by O'Reilly.

Rails today has a very strong preference for REST over SOAP when it
comes to Web Services. Having experience with both, I can say without
equivocation that REST is the way to go if you can. If you can't, use
the plugin at http://agilewebdevelopment.com/plugins/action_web_services

HTH,
Bill





--
Steven Elliott Jr

--~--~---------~--~----~------------~-------~--~----~
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 (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #4  
Old   
sameera
 
Posts: n/a

Default Re: Web Services - 11-05-2009 , 04:51 AM



Hi Steven,

If you are using rails 2.3.x it already create web services for you as
default(although its simple), RESTFull approach. In controller you
might have seen this line,

respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @object }
end

there format.xml { render :xml => @object } means it returns a
RESTFull xml file. (or even you can post as xml files)

hope this helps,

cheers
sameera







On Nov 4, 7:24*pm, Steven Elliott Jr <steve.elliottjr... (AT) gmail (DOT) com>
wrote:
Quote:
Hello,

Has anyone had to write a web service in Rails? If so, I'd love to get
some information from you as to where to begin.

I have recently started introducing Rails into the enterprise at my
office. It has been met with some hesitation by the older developers
(all using .NET). Anyway, a requirement came up to write some web
services that allow another web company to consume certain
information. Basically i need to set up a registration service for
members and then a log in service where we can authenticate users...
we'll be storing the credentials on our side.

Basically it breaks down like this:

Registration
* * *other company will pass last 4 of SSN,
* * *Zip code,
* * *Email Address,
* * *Password
Our Response
* * *Already registered (boolean): true if already registered, false
if not
*if registered
* * * * the registered email address (string)
* * * * the registered password (string)
* * * * other company can then use these to send them a forgot
password email

Login
other company will pass
* * email (string)
* * password (string)
Our response
* * allowed (boolean)
* * other information...

We're storing all of our data on SQL Server 2008 but that's not a big
issue. I wanted to be able to show Rails' capability of quickly and
easily handling this standard enterprise requirement. I'd love to hear
some thoughts from anyone who has done this type of thing before. I am
really trying to avoid using Windows Communication Foundation for this
type of thing. I was thinking just a very SOAP type of thing would be
the best approach.

Thanks!
Steve
--~--~---------~--~----~------------~-------~--~----~
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 (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.