This post originated from an RSS feed registered with Ruby Buzz
by rodney ramdas.
Original Post: Railsconf 2006
Feed Title: pinupgeek.com
Feed URL: http://feeds.feedburner.com/pinupgeek
Feed Description: A personal take on Ruby and Rails
So, I’m about to board my plane back home. Railsconf 2006 was great. I met a lot of interesting people. I’m sure you’re going to hear a lot from other faithful bloggers about Railsconf (the amount of macbooks and macbook pro’s was astonishing and there’s nothing like the sound of a hundred keyboards blogging live and direct).
Major hotness to come out Railsconf you ask ? Ha, how about why’s Balloon ?
And ofcourse: DHH announced ( and almost immediately released) ActiveResource. ActiveResource takes CRUD to the next level basically by applying crudness to http. If that doesn’t make immediate sense have a look at this:
Person = ActiveResource::Struct.new do |p|
p.uri "http://www.example.com/people"
p.credentials :name => "dhh", :password => "secret"
end
Here David sets up a Person as a struct to a uri that aparently needs some credentials as well.
Next you can use that Person as a crud resource:
david = Person.new(:name => "David")
# GET http://www.example.com/people
# David
# => Location: http://www.exapmle.com/people/2
david.find(:name => "David")
# PUT http://www.example.com/people
# David Heinemeier Hansson
# => (200 OK)
david.save
class ActiveResource::Base
uri "http://www.example.com"
credentials :name =>"dhh", :password => ""
end
While you guys ponder this and ofcourse start to create the most agile webservices ever I’ll try to sleep on the plane. See you on the other side in a bit. I expect at least an Amazon ActiveResource waiting there for me …. (I’m particulary interesting in crudding Amazon wishlists and S3).