Over a million developers have joined DZone.

Node.js: A Beginner’s Perspective

DZone's Guide to

Node.js: A Beginner’s Perspective

· Web Dev Zone ·
Free Resource

Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.

I’d been curious about node.js for a while. Finding Twitter all atwitter about it at any particular moment isn’t difficult. People are experimenting with it and other JavaScript technologies, like WebSockets. Yahoo even showcased a multi-core HTTP server written in it a few months back. I already had a decent working knowledge of JavaScript. (If you don’t, check out Eloquent JavaScript or Crockford’s JavaScript to get up to speed.) So, I decided to poke my head in, see what all the hype was about, and share my experiences for any others considering doing the same. Here are my lessons learned.

Have at least a basic working knowledge of git. A significant number of node.js projects are hosted exclusively on github. While you can grab the source code by downloading an archive, it can make getting the latest updates tedious (compared to a few simple git commands) and makes it a lot more difficult to contribute back to those projects. Also, users of node.js and git seem to be of similar mindsets, so if you’re familiar with one community, chances are you’ll be comfortable in the other. There tends to be a good bit of overlap as well.

Look around for existing solutions. Don’t succumb to NIH Syndome, especially not just because of the project’s young age compared to some much older languages. The plethora of existing software written for it is pretty amazing. Good examples include the npm package management system, which can be very helpful in installing and distributing node.js packages, and nodeunit, a great simple unit testing framework. Regardless of what supporting library or tool you might need, you’ll probably find at least one option already available.

Seek out good resources. The project docs are pretty good. The community blog How to Node has lots of info on node.js topics. Follow the #nodejs Twitter hash tag or Delicious nodejs tag. Talk to others using node.js. It’s got a large and lively community of enthusiastic people doing cool cutting-edge stuff. For example, most non-library projects will probably need to be backed by a data source of some type. Whether you want to use MySQL or MongoDB, node.js can handle it. If you get stuck, post your query to the mailing list.

Don’t forget what language you’re using. While node.js hasn’t been around but a few years and isn’t a language in and of itself, JavaScript is very well-established and has plenty of existing libraries already available. node.js runs on V8, the same JavaScript engine that powers Google Chrome. If you can’t use your favorite library in node.js, there are probably already similar alternatives that people will readily suggest.

Most people know me as being a PHP developer. Don’t think this means that I’m abandoning it in favor of node.js. This was mostly just a small foray to explore another development platform. I’ll likely be keeping my eye on it, but it’s not likely to become my primary skillset anytime soon.

If you’ve used node.js, please post a comment. I’d love to hear about your own experiences and what resources you have to suggest for new users like me who are looking to get their hands dirty.

Take a look at an Indigo.Design sample application to learn more about how apps are created with design to code software.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}