Re:I don't understand why anyone would use Node.js
by dumbphone on Wednesday June 29, 2011 @04:24PM
(#2711112)
'With Node and a framework like Express, you can understand things at the level of "let me look at this HTTP request and decide how to respond to it."'
Sure, but roughly the same kind of thing is available in most other serverside languages. Python has Flask, Ruby has Sinatra, and PHP also has several mini-frameworks.
Re:I don't understand why anyone would use Node.js
by TrevorBurnham on Wednesday June 29, 2011 @09:28PM
(#2712101)
Right, I like Sinatra a lot. But there's substantially more magic there than in Express, which is actually a pretty thin (yet powerful) wrapper around Node's low-level HTTP API.
I've done a fair amount of server-side development in Java and Ruby. What I like most about Node.js is the feeling that you can be as close to the metal as you like. You don't have the endless boilerplate of every Java web framework, or the extensive "magic" of RoR. With Node and a framework like Express, you can understand things at the level of "let me look at this HTTP request and decide how to respond to it." This, to me, is beautiful:
It's going to take more time to build a full-featured web app that way than with RoR or Django, but you'll understand it better and it'll scale well. For something that's only been around for two years, Node.js has a remarkable ecosystem—you can tell that a lot of very smart people are gravitating to it.And yes, being able to use the same language for both your client-side and server-side code is pretty dang cool. It's also practical. Historically, development teams have tended to focus on the server-side and learn JS only well enough to hack together some jQuery into doing what they need on the front-end. The result has been a lot of buggy and lackluster front-end code. Node.js gives teams a compelling reason to master JavaScript, and to learn tools like CoffeeScript. And that's great news for the web as a whole.