I've been waiting on a few fixes for Jawaya from the intrepid Ryan, who has real paying work to do as well, so in the meantime I've taken a step back from Jawaya until after this post.
Note: I'm at best an intermediate programmer; and this post is targeted toward beginners and intermediates. If you're a code jockey, you may find yourself guffawing out loud as I say things like "tests? we don't need no stinkin tests!".
The nicest thing is that you don't have to ask your brain to think differently each time you switch from browser to server to database. That said, I'm using a templating system that isn't JS, but it eases working with HTML, with which I'm already, of course, comfortable, but the syntax is really clean.
So here's the toolbox:
- web server: Node.js
- real-time goodness: sockets.io (for chat, streaming, etc)
- model, view, control framework: Express.js
- HTML templating: Jade. Clean, simple, outputs HTML. Can incorporate JS.
- CSS Templating: Stylus. Really clean, much cleaner than CSS and outputs to it.
- database ORM: Mongoose. Basically makes it simple to work with Mongo, which is already simple, but cuts down on the amount of overhead. If you like dot notation, like user.name='charlie'; user.save(); then you're going to love Mongo and Mongoose. Note: mongoose documentation ain't great, so make sure you study the Mongo docs.
So on top of Node, I installed NPM, which is something like node package manager for installing and managing node add-ons called modules.
For instance, installing express is simple: npm install express.
Then I installed Jade & Stylus, and then mongo and mongoose. I was able to test each of those pretty quickly, and had minor problems I was able to get around.
The real fun came in when I installed sockets.io, which instantly gives you real-time functionality. Imagine killer-fast multi-player gaming, where you have to send, receive, and render real-time data from multiple sources. Fun stuff.
Note I'm not offering any code samples--I don't have the time today and this blog isn't really designed for that.
And somebody ported node to the iPhone, which enables so, so much. I can't even begin to get into the possibilities here, but I guarantee you there will be a huge amount of investment in the mobile node.js space. Huge.
Breaks are nice. But break's over--back at it.