Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Node.js tools: Server-side JavaScript comes of age

Node-inspired development environments and cloud platforms are redefining the Web application stack

  • Print
  • Feedback

Page 2 of 7

 Node.js tools: Cloud9 IDE
The Cloud9 IDE is a development environment built into a website or, as the ad copy reads, development-as-a-service. You build your code with the Web app and the optional Chrome plug-in. Then, after testing it locally, Cloud9 will deploy the code into Heroku, the Joyent Cloud, or Microsoft's Azure (more on these clouds below).

The Cloud9 editor is sophisticated, providing more than the basic options available with a <textarea> field. Bolted-in extras include a JavaScript beautifier that will fix white space and clean up indentation. The code is colored, given line numbers, and semiparsed to identify undeclared variables.

Although many of the features won't surprise anyone using an IDE on their desktop, the surprise is that Cloud9 feels like a desktop tool in your browser. My favorite part is the command-line field where you can type in Git commands just as you would in your terminal window.

The service is not just aimed at Node programmers. You can also upload PHP and Ruby. The editor even claims the ability to colorize the syntax of C++, although I'm not sure what would happen to this code.

Everything here is free if you're willing to share your code with the world. If you want private projects and a private environment when it's available, the price is $15 per month. Cloud9 also promises to add collaboration tools.

 Node.js tools: Dreadnot
On the surface, Node looks easy to use in a product. Once you write your code, you move it to the machine and type node myprogram.js. The node runtime handles everything because you've coded many of the details into the JavaScript yourself. You choose the port for listening and the protocol, all in JavaScript code.

Alas, there are never enough configuration options in life, so serious Node folks created Dreadnot, a terrible pun, and set it to work organizing the Node stacks of code. It logs into your Git directory, checks out your code, and starts it up on your server. You control all of this with another configuration file, and Dreadnot handles the deployment. This is a nice way to begin automating a checklist of what needs to be fixed and checked before you run your code in production.

The Dreadnot code, now open source, was based on a tool called Deployinator created by Etsy to handle some of the workload around its craft marketing site. There's not much documentation, but that isn't a problem yet. Most of the options are self-explanatory, except perhaps the password file. But the code is all there and it works.

 Node.js tools: Eclipse JavaScript debugger
On the other end of the spectrum is the Eclipse IDE. There is now an Eclipse plug-in from the Google Chrome team that connects the venerable tool with the back end of the V8 JavaScript engine. If you start Node.js with the <tt>--debug</tt> option, Node will look to talk with any remote debugger. Google's Eclipse plug-in for debugging Chrome seems like just the ticket.

It's a nice idea, but I found it buggy. A decorator function kept clogging the stack of Eclipse, and nothing seemed to communicate as well as it could. While I could pause Node and poke around, I found it easier to debug Node using the output of the command line that started it. The Eclipse interaction was too much trouble.


  • Print
  • Feedback

Resources