Roll on Rest On Ruby On Rails

It’s good to hear Rails 1.2 is all about embracing REST. Working with Ajax has helped me really appreciate the benefits of REST, and it all fits in with the Rails mindset quite nicely. Right now, we have URLs like

/user/update/5

whereas REST would have it as

/user/5

and then POST in the details – the nature of the method (“POST”) tells you it’s an update. Alternative we could send in a message with DELETE method if we wanted to delete user 5 instead. (In practice, there will be a slight hack to do this, involving a hidden field, because most browsers can only upload POST and GET).

By piggybacking on the commonly accepted conventions of REST, there will be even more “convention over configuration” embodied in Rails. And even greater division between RESTians and SOAPians. If nothing else, it’s a smart way to attract people who get REST and repel those who push SOAP ;-). (Software Engineering Radio recently quipped SOA is now just a pure acronym (just like KFC, AOL, Ajax) … it’s not simple, object-oriented, or ?accessible.)

Leave a Reply