2. Doing web development with anything not called node.js feels like going back home to the midwest and being force-fed trans fats. @hipsterhacker
3. node.js 101 JavaScript based I/O Framework Built on Google’s V8 JavaScript Engine Air thin bindings to low level C libraries Evented & Non blocking Single threaded Everything is asynchronous Scalable & Less memory hungry
4. var results =db.query("select * from Table"); for(var i =0; i <results.length; i++){ // write result } // do some other stuff
5. var results =db.query("select * from Table"); // WASTED CYCLES! WASTED CYCLES! for(var i =0; i <results.length; i++){ // write result } // do some other stuff
6. db.query("select * from Table",function(results){ for(var i =0; i <results.length; i++){ // write result } }); // do some other stuff
8. var http = require('http'); http.createServer(function (req, res) { // respond to request res.writeHead(200, {'Content-Type':'text/plain'}); res.end('Hello World'); }).listen(8124); console.log('Server running at http://127.0.0.1:8124/'); // # node example.js // Server running at http://127.0.0.1:8124/ Anatomy of an App
9. The Good Stuff It’s fast, scalable and lightweight Conceptually easier to grasp Large, active enthusiastic community Technologies covering all project needs NPM (Node Package Manager) Express (Web Framework) Connect (Middleware Layer) Vows, Docco, Jake, and many more.
10. The Not So Good Stuff Asynchronous code can get messy Its evolving fast and changing constantly Production ready concerns It’s JavaScript, it’s dynamic Debugging isn’t easy IDEs aren’t that helpful People are afraid of JavaScript Currently requires POSIX based systems Some Windows support (unstable)
11. The Rest Node.js isn’t doing anything “new” It’s not just about the web stuff Node.js isn’t the first or only SSJS framework Narwhal Ringo.js Rhino JScript