First thoughts on Node.js

This weekend I took out some time to explore Node.js, with the possible goal of using it to replace a Django project. I had a pretty mixed experience and am interested in feedback from people who have used both – opinions wanted.

To be upfront and fair, I’ve been using Django for years but have only put about five hours into investigating Node.js, so my impressions are completely lopsided. But here’s what it looks like to me:

– Asynchronous programming is going to take some getting used to. That’s OK.
– Node.js is really, really fast out of the box. But part of that is surely because it doesn’t include very much.

– Django is a complete, cohesive, end-to-end solution, where all the parts fit together seamlessly (“the Mac way”). Node.js is a baseline on top of which you pick your own framework, your own ORM, your own db driver, your own URL routing system, etc. etc. (“the Unix way”).

– There are advantages to the unix way, but IMO systems like that are more difficult to get off the ground and more difficult to maintain. The parts don’t necessarily talk to each other like you’d expect, and the whole project doesn’t get upgraded at once. End-to-end systems like the Mac ecosystem and Django are a huge win for productivity. For comparison, note the relative obscurity of TurboGears (a bunch of disconnected parts) compared to Django. Django ate TurboGears’ lunch because its cohesive and consistent. Productivity and reliability are the most important factors for me.

– The Node world is extremely fragmented right now, with dozens of Node libraries, solutions, and frameworks all competing for attention. But Express seems to be the most popular framework for Node right now, so I’m really comparing Express to Django (not just node.js to Django). And yet…

– Express doesn’t even include a way to connect to a database. You have to add that on.

– Express doesn’t include an ORM – you need to add that on. I looked into some Node ORMs, but they didn’t seem nearly as complete or sophisticated as Django’s.

– Express doesn’t provide the range of helpful command line tools, data API, etc. that Django provides.

– Express certainly doesn’t include anything like the Django admin.

– Purely my opinion, but Python just feels more elegant than Javascript. Code is more compact and more readable. Not a big hurdle though, just a preference.

And so on and so on. Django feels like “batteries included” – Node feels like a rummage sale.

Overall, it feels like Node/Express is really young. It’s exciting in ways, and shows huge promise, but how long will it take for it to feel competitive with mature frameworks?

Perhaps if I spent more time with it I’d feel less critical. Please let me know what I’m missing!

Google+: View post on Google+

One Reply to “First thoughts on Node.js”

  1. Scott, i've had to review monitoring systems and looked at around 13 different monitoring systems…. and whilst you think wtf peter, seriously … you need to actually ask…what is the criteria ??? And if you can answer the criteria question, then you at least have a starting point!!

    Let me know what you choose, and how it's going!

Leave a Reply

Your email address will not be published. Required fields are marked *