| So let's look at the Richardson Maturity Model, a quick and easy way to evaluate how RESTful these are. 1. Resource - yep, they have this concept to some extent, although additional support for metadata in headers would be nice. (i.e. automatically doing last-modified, etc) 2. HTTP verbs - yep, they all do this quite niecly. 3. Hypermedia controls. Nope. In my opinion, levels 1 and 2 are really just developer convenience, they make for nicer APIs to develop with, but don't necessarily add a huge amount over RPC or something else as far as the code goes. The massive benefit of REST comes in level 3. When you have APIs that are self-descriptive, and consumers that adapt to changes in APIs in the same way that we (people) adapt to changes in the structure of web pages, that's when things get really interesting, that's where the major advantages lie. Unfortunately, I haven't seen good support for level 3 in a Node.js framework yet, although I'll admit I haven't had a good look for a few months. As far as I can remember, Rails isn't a huge amount better in terms of native support, although I'm sure there are gems which will help. So far, the best I've seen at a framework for making RESTful APIs is the Django Rest Framework: http://www.django-rest-framework.org/. It has really good support for hypermedia controls. Steve Klabnik wrote a good post on the topic of RESTful APIs, and having seen them being used, I really do think they are valuable: http://www.django-rest-framework.org/ Also, I find the example in this talk about Hypermedia APIs to be an incredibly elegant implementation, and a case of a really well designed API: http://vimeo.com/20781278 |