Hacker Newsnew | comments | show | ask | jobs | submit login

I'm the author of the CoffeeScript book from PragProg, which includes a chapter on Node.js.

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:

    app = require('express').createServer()

    app.get '/', (req, res) ->
      res.send 'hello world'

    app.listen 3000
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.




'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.

-----


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.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: