Tuesday, November 24th, 2009
Node and Djangode Follow-Up
Simon Willison's Talk last week on Node generated a healthy dose of post-conference buzz, and he's followed up with a blog post on Node and his higher-level API for Node, Djangode.
Node’s core APIs are pretty low level—it has HTTP client and server libraries, DNS handling, asynchronous file I/O etc, but it doesn’t give you much in the way of high level web framework APIs. Unsurprisingly, this has lead to a cambrian explosion of lightweight web frameworks based on top of Node—the projects using node page lists a bunch of them. Rolling a framework is a great way of learning a low-level API, so I’ve thrown together my own—djangode—which brings Django’s regex-based URL handling to Node along with a few handy utility functions.
-
-
var dj = require('./djangode');
-
-
var app = dj.makeApp([
-
['^/$', function(req, res) {
-
dj.respond(res, 'Homepage');
-
}],
-
['^/other$', function(req, res) {
-
dj.respond(res, 'Other page');
-
}],
-
['^/page/(\\d+)$', function(req, res, page) {
-
dj.respond(res, 'Page ' + page);
-
}]
-
]);
-
dj.serve(app, 8008);
-
Pretty simple, and gets a whole lot more interesting when he shows how to build a simple Comet server with this API. He also covers database access, where there's a good fit between server-side Javascript and the NOSQL servers that speak HTTP and JSON.
His article also provides a nice overview of Node itself, along with some straightforward install instructions.
At first glance, Node looks like yet another take on the idea of server-side JavaScript, but it’s a lot more interesting than that. It builds on JavaScript’s excellent support for event-based programming and uses it to create something that truly plays to the strengths of the language.
Node describes itself as “evented I/O for V8 javascript”. It’s a toolkit for writing extremely high performance non-blocking event driven network servers in JavaScript. Think similar to Twisted or EventMachine but for JavaScript instead of Python or Ruby.













be fatal Gucci Bag for the Gucci Pursesnation to rolexoverlook rolex watchesthe urgency of rolex watchthemoment Rolex Replica and to louis vuitton handbagsunderestimate the determination of the negro. thissweltering summer of the negro’s legitimate discontent
What an inspiring article you wrote! I totally like the useful Police glasses info shared in the article.
This is the best Chanel glasses article I have ever found on the Internet.
You have given us some interesting points on Levi’s glasses. This is a wonderful article and surely worth reading.
Great resources of Dior glasses! Thank you for sharing this with us.
I totally agree with you on the point of Seiko glasses. This is a nice article for sure.
We share the opinion on Dupont glasses and I really enjoy reading your article.
Good job for writing this brilliant article of Calvin Klein glasses.
This Alain Mikli glasses article is definitely eye-opening and inspiring.
I greatly benefit from your articles every time I read one. Thanks for the Marc Jacobs sunglasses info, it helps a lot.
Thank you so much for sharing some great ideas of D&G sunglasses with us, they are helpful.
I appreciate your bright ideas in this Mont Blanc sunglasses article. Great work!
I like your ideas about Christian Dior sunglasses and I hope in the future there can be more bright articles like this from you.
Great article, it’s helpful to me, and I also like the useful info about Gucci sunglasses.
I really like this Versace sunglasses article, and hope there can be more great resources like this.
I am glad to read some fantastic Cartier sunglasses article like this.
Your do have some unique ideas here and I expect more eyeglass frames articles from you.
Excellent point here. I wish there are more and more eyeglasses frames articles like that.
Bright idea, hope there can be more useful articles about prescription sunglasses.
It has been long before I can find some useful articles about reading glasses. Your views truly open my mind.
I love this eyeglasses brand article since it is one of those which truly convey useful ideas.
Interesting article
tote bag
multi functional bag
0clutch
rolling luggage
handbags
travel bag
eyeglasses
eyeglasses
eyeglass frames
eyeglass frames
prescription eyeglasses
prescription eyeglasses