Node.js as Rails replacement? [duplicate]
Possible Duplicate:
Could node.js replace Ruby on Rails completely in the future?
I'm doing bad in understanding the sense of node.js. I understand what it does regarding IO etc., but is it for example a Ruby on Rails replacement? Can I do the same database operations 开发者_开发知识库etc.? What about authentication?
what kind of web or other applications get build on basis of node.js?
is it for example a ruby on rails replacement?
IMHO RoR has much longer history/experience/functionality for website development. Node.js itself is a lightweight (low level) framework from which you can take off to build various types of server-side applications (not just web oriented). One of its main advantages is in wide spectrum of modules provided by community of open source developers.
Can i do the same database operations etc.?
Yes, just find the right module for your type of database.
What about authentication?
Modules like connect offers built-in authentication functionality.
Node.js is a totally separate technology to Ruby on Rails, built on a different technology stack. In its current state it's not a replacement for Rails, and certainly not a drop-in replacement
AIUI Node.js is a bit more low-level than that, in particular it has no support for typical high level web development (MVC model, db integration, etc). Look at it as a javascripty basis to write networking software on (including web frameworks).
There are some web frameworks out there built on Node.js. The only one I know is geddy.
Node.JS is to Javascript as EventMachine is to Ruby (and Twisted to Python). It's something completely different from Rails.
To illustrate: the Thin webserver that is often used to serve Rails application was built using EventMachine. So you would need a complete web framework on top of Node.JS to make it a Rails replacement.
You are comparing apples and pears.
Ruby on Rails is a MVC Framework to build websites. Nodejs is a framework to build evented I/O operations.
You can build a port of RoR on top of nodejs if you want.
精彩评论