I've used flask, rails, and padrino (sinatra).<p>Flask was my favorite but is hard to keep organized without much of a toolkit or recommended dev patterns baked in. I recognize that blueprints really help, but a consistent cross-project organization would be nice.<p>The transition to padrino was welcomed due to a lot of basic structure that is consistent in all projects, but unsustainable due to a functionally dead community (#sinatra has 25 people at max and nobody talking, #padrino has maybe 8).<p>Rails is far too much bloat to just be serving JSON (benchmarks show that sinatra is 4-8x faster...) and implies TOO strict a structure to development (also, being a python person...I don't appreciate magic).<p>What do you recommend?
I'd agree that Node.js is pretty dang nice for RESTful APIs. The fully asynchronous nature means really great throughput on the server, especially when most of your processing time is spent in DB or file I/O (as is often the case in APIs). As for disadvantages... I dunno. I guess if you don't really know JS very well it could be difficult to get into, and good developers are harder to find than in some other languages. But as a platform for APIs it's pretty solid.<p>As for a guide... There's a guide for LoopBack specifically here: <a href="http://docs.strongloop.com/display/LB/Getting+started+with+LoopBack" rel="nofollow">http://docs.strongloop.com/display/LB/Getting+started+with+L...</a>
That framework was written specifically for writing REST APIs.
> Rails is far too much bloat to just be serving JSON (benchmarks show that sinatra is 4-8x faster...)<p>Does it matter 1 bit? If you can't <i>demonstrate</i> that it does, you might as well choose the framework with the best mascot and Django's mascot is pretty damn awesome.
I would recommend openresty. A library that allows you to script nginx using a lightweight,easy to learn language lua. You get all the advantages of nginx (unmatched speed and resource efficiency) along with the ability to "inject" lua code into it's event loop. Which should be a compelling enough reason for you to give it at least some serious thought.<p>As far as organization of code is concerned openresty does not impose any restrictions on you. But since it is just lua you can bundle you code into modules. And then you can use those modules using "require" much like in node js (though it is slightly different)<p>Also there is lapis[1] and sailor[2] if you are looking for something more organized.<p>[1]<a href="https://github.com/leafo/lapis" rel="nofollow">https://github.com/leafo/lapis</a>
[2]<a href="https://github.com/Etiene/sailor" rel="nofollow">https://github.com/Etiene/sailor</a>
What about PHP ? You may try Aisel, its uses clean object-oriented PHP <a href="https://github.com/ivanproskuryakov/Aisel" rel="nofollow">https://github.com/ivanproskuryakov/Aisel</a>.<p>Aisel based on principles of REST architecture combines two different and independent frameworks - Symfony2 with a robust PHP community and progressive AngularJS.
for <i>this</i> specific use case? Node.js using LoopBack.io. I/O platform with a framework that was specifically designed for this use case, built on top of Express to save you time.