5 ms·
I'm not sure why Sinatra was not considered in the mix here. Sinatra is great for building simple APIs in Ruby. Heck, Express essentially started out as a clone
by jroes 14y ago
I'm not sure why Sinatra was not considered in the mix here. Sinatra is great for building simple APIs in Ruby. Heck, Express essentially started out as a clone of Sinatra for Node.
One challenge in the Node community is the ecosystem. There are not nearly as many libraries in npm as there are in RubyGems. Of that small set of libraries, a large portion of these have been abandoned. Of that smaller set that haven't been abandoned, there are large portions of missing functionality, are not very stable, or are constantly changing.
There are certain cases that Node works really well for right now, like building real-time chat apps. But having worked on some medium-scale Node projects recently, I constantly find myself re-implementing Rails functionality or rewriting common Ruby gems due to the lack of mature libraries.
- arturadib 14y agoI think the author emphasized performance. Sinatra might be Express's precedent, but it doesn't have Node's runtime behind it to deliver performance (async I/O, low-memory footprint, etc).
- gary4gar 14y agoTried running Sinatra on jRuby?
- jroes 14y agoPerformance is one of the few legitimate arguments the Node community makes. It is wicked fast out-of-the-box compared to Ruby out-of-the-box. Unfortunately there are many other factors involved in building software that matter as well.
- jshen 14y ago"deliver performance" is too abstract. I usually throw varnish in front of my ruby apps to get performance. I find this gives me a more productive programming environment (ruby), and insane performance. Node only becomes useful for me when I need to keep a lot of connections open and handle them simultaneously, and a few other rare situations like that.
- dataminer 14y agoIf you want async sinatra, try https://github.com/kyledrake/sinatra-synchrony https://github.com/kyledrake/sinatra-synchrony
- louischatriot 14y agoVery true, libraries for nodejs are usually not as mature as those for Ruby. That said, the most useful are actively maintained, when I have a question or submit a pull request it is generally answered/merged within a day. As the OP says, Nodejs is not nearly as mature and proven as Rails, but I believe (and that's really a faith-based opinion) that this kind of architectures is the future.
- programminggeek 14y ago+1 on Sinatra. Sinatra is simple and is great for shipping. Most of your apps will never have to scale to millions of users, so ship something fast with a tool that you know. Node.js is probably a premature optimization for most projects. Get your project out the door, if you have to rewrite the down the road, that's fine, at least it's no longer tightly coupled to your whole web app views/controllers.