Hacker News new | ask | show | jobs
Ask HN: Node.js or Sinatra
2 points by rajlalwani 4217 days ago
I have a very good on Ruby and would develop Sinatra quite quickly whereas NodeJS will take time. But happy to invest time if it is significantly better. Please suggest.
3 comments

In case you'll restrict the choice between Sinatra and Rails, if you think the application is going to grow up to a big, full stack one, then go with Rails otherwise you'll find yourself reinventing the wheel many times. Unless this is exactly you want, to build your wheel to be different in some fundamental aspect (i.e. building your stack in a different way than how Rails' does)

Indeed Sinatra is great for playing and experimenting thanks to its bare bones and not opinionated structure, which makes web development pure fun for basic things, but I'd only use that (and I actually did and would do again) for personal projects or small blogs or small things that basically don't need all of the attentions that a regular full blown web application needs all around.

Unless, as I said, what you want is exactly to build not only your app, but your personalized stack too, either for learning purposes or for the sake of only going with as few components as you might actually require, but is it worth it?

Keep in mind that if this is a personal project or you're building it just for fun and on your own, and if your satisfaction will come from actually seeing the app working and doing something rather than just building it, then having to take care of all the minute parts could at some point take out all the energy you initially decided to put into it...

I had to learn myself that the complexity of a system increments exponentially with the number of items or features involved, not linearly.

Sinatra is better performance-wise IIRC.

Then again, Node comes with the convenience of having the same programming language on the both the front and the back end of things.

If you don't need performance, it's just preference. Stick to Sinatra if you want to bang out the app quickly.

If the OP is interested in having the same programming language on both the browser and the server side, I'd advice to keep an eye open on Ruby Volt Framework http://voltframework.com/
Are you sure? I dont think Sinatra outperforms nodejs, although I could be wrong, this is just a broad perspective of Node's speed and Ruby's speed. Any benchmarks or anything to enlighten me?
Ruby on Rails.
Ruby on Rails is different from Sinatra or NodeJS... wondering which one is better for API kind of app
You can use Rails for that and much more. Or Node, or Go or Erlang or whatever. "It depends".