When to use node.js vs sinatra vs rails? [closed] When to use node.js vs sinatra vs rails? [closed] javascript javascript

When to use node.js vs sinatra vs rails? [closed]


If you're building a complete web application, you should probably use Rails as it provides the most comprehensive services. You can also leverage an enormous amount of work produced by the community.

Sinatra is great for producing really thin, no-nonsense application services. You don't get much to work with, but it is very fast. If you need a database connection, you will have to add it in, and things like this can make creating even medium-sized applications a challenge. Basically if you need something very simple and don't need Rails, you probably need Sinatra.

node.js is a great new framework for producing responsive, scalable applications, but it doesn't have nearly the library of add-ons that a mature platform like Rails does. node.js really excels at applications based on streaming and on-demand data transformation. Some of the examples produced in Node Knockout are very interesting, but these were produced by some exceptional teams.

While the Node Knockout entries are very well done, when compared to the sort of applications that were produced in the 2009 Rails Rumble they seem to come across as toys lacking depth and complexity. This is not to discredit the work done by the Node Knockout teams, but it does show that the strengths of node.js are mostly to do with real-time events and less with conventional more ordinary DB-based apps.


Use Rails if you're working for a client and need some fast cash. If you want to enjoy coding your app and keep maximum flexibility and app speed, use Sinatra. It's easy to build large applications with it, people who say otherwise haven't used it.

Node.js is more like Rack, which Rails and Sinatra is built on, and doesn't really compare. Express.js, which you can use on top of Node.js, is comparable to Sinatra, there might be other frameworks that compare to the bloated Rails stack, google it. If you like coding async Javascript, use Node.js. It's also faster than Sinatra and Rails, but coding in Ruby has it's advantages since you can use lots of really nice ruby gems which makes life easy.