I’ve had Dave Thomas’ post about REST and the RADAR architecture open in one of my tabs since it was published a few weeks ago. I kept meaning to blog about it since it seemed very insightful with regards to the uses of REST as well as challenges ahead.
One issue that needs to be examined is that not all applications will follow a CRUD-style architecture so those will not map easily to some of the current Rails / REST services. I mention Rails only because the new REST routing and ActiveResource will enforce specific implementations which might or might not be the best choice for an application.
Dave talked a bit about RADAR (RESTful Application, Dumb-Ass Recipient) during some of the discussions last week at the Advanced Rails training. As an aside, if you ever get the chance to attend anything put on by the Pragmatic Studio, do so without hesitation. They really do an incredible job.
Ok, back to RADAR, the idea is simple, browsers are dumb and only understand two HTTP verbs (GET and POST). We can do things within URLs to help with the other verbs but really that’s just big hack. Why not just have your REST server separate? Then have the View application interact with that behind the scenes. The browser will be talking with the View, not knowing any better.
By doing this, I believe you will see an increase of small, individual apps which just have one job. They could be things like authentication or preferences or maybe even logging. This will increase your network traffic but for some things that won’t be a problem. The apps can be focused and reused by other View applications.
Technorati Tags:
rest, rubyonrails, RADAR