Building Web Apps--nodejs looks good

I want to create the World's Greatest Web Development Environment--for myself and for my friends. But first for myself. I've been shopping for pieces for several years and I think maybe I've found the holy grail. We will see. But right now here are the components:

  • Chrome Browser with Development Tools. The debugger is derived from Firebug (in part) and I think it goes beyond it. In any case, it's amazingly well designed. You can edit javascript and CSS inside it, and your changes are instantly re-attached and re-rendered. If you don't want Google's branding you can get Chromium, as noted here
  • Google Chrome Extensions with Debugger API to make the debugger more awesome.
  • Chrome Dev Tools Autosave. This lets you save your javascript and CSS changes as you go.
  • livereload (the ruby gem and chrome plugin). This monitors changes in your file system and reloads when you change. This is overkill (especially with Chrome Dev Tools Autosave) but I have in mind a smart architecture that will just reload what needs reloading.
  • Nodejs for the back end. Here's a node.js web server. Yes, it just serves one page, but what do you want for 6 lines, nicely indented:
var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
  • Want to debug it? Use node_inspector which translates node.js's debug port to something that the Chrome debugger can use. As described here: all you've got to do is:
    • install node
    • npm install node-inspector
    • start node-inspector (node-inspector&)
    • open a browser at localhost:8080
    • run the program to debug with something like:
    • node --debug example.js
    You can also use --start-brk to put a breakpoint on the first line.
    • By default that sets up a debug port on 5858 which node-inspector then forwards to Chrome's debugger. 
    • You can find node-inspector on github
  • jquery and jqueryui and plugin friends for client side programming.
  • gvim with a whole bunch of plugins recommended by vimcasts 
  • Resources for node.js are here including a bunch of tutorials I am working through.
  • Some nice tutorials:
And more to come...
Enhanced by Zemanta

Comments

Popular Posts