Node.js: Simply Awesome

I’m one of those guys that get fired up about new shiny toys every now and then. And the latest shiny toy is Node.js. Aaah, shiny! A few years of web development experience behind me now allows me to make a slightly more informed opinion, however, and I would like to share it here with you.

[ read more... >

Comments

Mongoose Validation and Virtual Fields

Mongoose, MongoDB ORM for node.js, allows you to create virtual fields. However, virtual fields cannot be validated using the standard method of field validation. I will first explain how to add validation to normal, non-virtual fields, and then describe a method for handling virtual fields.

[ read more... >

Comments

Serial Expresso Testing with Mongo Fixtures

Expresso is a test runner for Node.js. It boasts “high speed parallel testing”. It means it can run your whole test suite of a couple of thousands of tests in less than a second… but this post is not about that. This post is about taking it slow, and running tests one by one like you might be used to from other environments (Python, anyone?).

[ read more... >

Comments

Blocking vs Non-blocking: Node vs Bottle

Node.js boasts real-time performance. Of course, depending on hardware, it may show some level od delay in responses, but it is usually able to handle requests as soon as they come in. I have built two simple hello world apps, one running on top of Node.js, and one running on top of Bottle/Bjoern. Bjoern is a non-blocking WSGI server written in C, and it should perform very well on its own, but Python is blocking, so we want to see how it stacks up against a pureluy non-blocking app written on Node.js.

[ read more... >

Comments

Profilejs: V8 profiling for Express framework

I’ve started using Danny Coates’ node-inspector recently. It works very well as a graphical debugger (runs in a webkit browser), and it can also serve as a profiler in conjunction with v8-profiler.

I wanted a tool that would profile all requests for me, so I could browse and pick through the logs afterwards, but I couldn’t find one. So I decided to write a middleware for Express that would pipe all requests throug the v8-profiler. The result is Profilejs.

[ read more... >

Comments

New Node.js Book from Packt

Node Web Development by David Herron (Packt)

Node.js is the new cool thing on the web, and everybody seems to be talking about it these days. And when everyone starts talking about something you start seeing books on the subject. Some time ago, I’ve caught David’s anouncement of the book he was writing, and was wondering about when it will be available, when Packt contacted me asking for a review of David’s Node web development, which has just been released (August 2011).

[ read more... >

Comments

Node Web Development

Quit scratching your head already. Of course you’re doing it, scratching your head and mumbling to yourself, “What’s a browser language doing on the server?” In truth, JavaScript has a long and largely unknown history outside the browser. JavaScript is a programming language, just like any other language, and the better question to ask is “Why should JavaScript remain trapped inside browsers?”

Cover of Node Web Development

With these words, begins your jorney though web development using server-side JavaScript with Node.js. Right from the start, David Herron’s Node Web Development (2011, Packt) gives hints as to who this book would be most useful to: experienced software engineers, getting ready to explore the Node.js platform for the very first time. Frontend engineers that are looking to get into backend development, would probably find this book very useful.

If you are the tartget audience, though, you will find this book to be one of the best resources on Node.js available.

[ read more... >

Comments