4 ms·
Someone please correct me if I am wrong, but Node.JS is a server side javascript runtime environment, correct? If that is the case, why do so many people insis
by neoCrimeLabs 11y ago
Someone please correct me if I am wrong, but Node.JS is a server side javascript runtime environment, correct?
If that is the case, why do so many people insist on comparing a framework, such as rails to node.js? Wouldn't the more relvant comparison be node.js vs ruby, or rails vs meteor.
So many people make such comparisons I feel like I'm the one who is crazy. Of course, I probably am, but that may have nothing to do with rails and node.js comparisons. :-)
- nazka 11y agoIf you want a real apple to apple comparison: Node.js = Rake, Sails.js = Ruby on Rails. Rake is a raw server, giving the minimum to do something. Ruby on Rails is a full stack framework giving a complete solution for both: the front-end (template, asset pipeline...) and the back-end (API, routes, ORM, security...).
- pfg 11y agoYou probably mean rack. Rake is Ruby's version of Make.
- mercer 11y agoRack is actually best compared to Node's 'connect' middleware. So Node + connect + Express offers a very barebones framework (similar to Sinatra for Ruby, as I understand it). And while there are efforts to create bigger, more rails-like frameworks that build on top of node (and usually connect, and sometimes even express), as far as I can tell there's nothing quite ready to be compared to RoR.
- throwaway3453 11y agoIt's possible that Node's culture of modules vs Rails' monolith design leads people to make these comparisons. News of Ruby outside of Rails being so infrequent certainly doesn't help either.
- meowface 11y agoIt has some web "framework" components as well, though mostly in the same way Go has them. Otherwise, I agree.
- dcre 11y agoI agree with you, but I suspect (not a node dev) the reason people talk this way is that almost everyone uses Express as their server, and a lot of people use NoSQL databases, which means they can live without an ORM, at least when they start out. (That probably doesn't mean they don't end up building a layer of abstraction over the database at some point.)
- mercer 11y agoThat's exactly how I'm using Node currently. While RoR would be smarter and faster if budget/time was an issue, I currently have the luxury of building a relatively simple site+CMS for a client with total freedom and a lot of time on my hands. After battling Rails' conventions and getting a bit sick of learning a lot of things that are only useful in the Rails world, I figured it might be nice to do everything almost from scratch (Express.js as a shortcut though). I'm using RethinkDB without an ORM, although over time I suspect my approach will become more ORM-like over time and I might just switch to one of the existing RethinkDB ORM's. It's loads of fun being able to understand most steps of the process of building a complete website that includes authentication, a database, a CMS, and whatnot, especially after relying on Rails' magic for a lot of things. I guess I just really prefer the explicitness of it all. That said, if money and/or time were an issue, or if the end product would have to be worked on by other developers, I'd probably go for RoR or Django. The amount of stuff it 'just' takes care of is much more than one might assume at first, and the amount of pitfalls in the category 'not knowing what you don't know' are not insignificant (XSS, for example).