Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    33
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Can someone explain to me what is "RESTful"

    I wiki'd it and my mind was blown. I suppose the process of defining it comes with what angle of perception the learner is coming from.

    I know some PHP and some MySQL.
    I can store stuff, and echo stuff. Loop through arrays and make session and cookie variables. Oh yeah, send emails too. These tid bits of knowledge can get one surprisingly far, but I'm still lost when it comes to the meaning of "RESTful". Can someone explain it to someone with my background?

  • #2
    New to the CF scene
    Join Date
    May 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When it comes to Ruby on Rails, RESTful is a way for writing web services.

    For instance, let's say you want to build an RESTful api to manage cars:

    http://host/cars - when you do a GET on this URL, you should get a list of cars
    http://host/cars/1 - when you do a GET on this URL, you are tring to get a car that has the ID of 1
    http://host/cars/1 - when you do a PUT on this URL, it means you are trying to update the car with the ID of 1
    http://host/cars/1 - when you do a DELETE on this URL, it means you are trying to delete the car with the ID of 1

    This isn't the only way of doing this, you can custom design your API and name things however you want or use whatever method (GET/PUT/POST/DELETE) you want to try to do those 4 actions (list, read, update, delete). However, the REST way follows some principles that allows you and third parties to interact more easily with your API because of the assumptions it makes.

    Here's there definition from the Ruby on Rails docs:
    http://guides.rubyonrails.org/getting_started.html#rest
    Last edited by kaizenfury7; 06-01-2012 at 09:37 AM.

  • #3
    Regular Coder
    Join Date
    May 2012
    Location
    USA
    Posts
    101
    Thanks
    0
    Thanked 7 Times in 7 Posts
    One big part of the whole restful thing is that you should use the different HTTP methods to represent different actions. Here you can find brief tutorial on creating RESTful web services using the Ruby on Rails framework : http://www.youtube.com/watch?v=J6r_l3cAS9s

  • #4
    New to the CF scene
    Join Date
    Oct 2012
    Location
    San Jose
    Posts
    9
    Thanks
    0
    Thanked 2 Times in 2 Posts
    REST is a set of architectural principles that stipulate that web services should maximally leverage HTTP and other web standards, so that programs gain all the good stuff that people already can get out of the web. REST is often contrasted with SOAP web services, and other "remote procedure call" oriented web services.

  • #5
    New Coder
    Join Date
    Sep 2012
    Posts
    13
    Thanks
    0
    Thanked 2 Times in 2 Posts
    The Restful Objects specification defines a set of RESTful resources, and corresponding JSON representations, for accessing and manipulating a domain object model.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •