It's Time To Get RESTful

Posted by jon, Thu Jan 18 09:31:00 UTC 2007

With Rails 1.2 RC2 released over a week ago and a final release imminent, it might be time to finally check out this RESTFul architecture thing.

With the simply_restful plugin being merged into Rails 1.2, using restful routes is a snap. It takes a bit to get your mind around it, but once you do, you’ll never look back. Restful routes really exposes your application and domain model. All those debates about what goes into what controller are gone. Its entirely worth your time to check it out.

If you have no clue what I’m talking about, fork out the $9 to Grosenbach for his REST screencast.

If you’ve played around with this already and get that it’s the future, check out Andre Lewis’s post on nested resources. Its a fantastic little into into nesting your routes. Its more of a follow along than a post, so get out that text editor!

Filed Under: | Tags: rails restful tutorials

Comments

  1. Jim Van Fleet 01.18.07 / 10AM
  2. Jon Maddox 01.19.07 / 12PM

    Its also worth noting that the CVREG facebook was done with RESTful goodness. So fire up you editor and play around with talking to it via ActiveResource.

    class Member < ActiveResource::Base
      self.site = "http://facebook.cvreg.org/" 
    end
    
    # in your controller
    
    @cvreg_members = Member.find(:all)
    

    Bam… theres all the members.

Have your say

A name is required. You may use HTML in your comments.