Archive for the ‘JavaScript’ Category
Book review: JavaScript Web Applications
December 21st, 2011 | books, JavaScript
- Author: Alex MacCaw
- publisher: O’Reilly Media
- pages: 280
Introduction
A book to create javascript applications for the intermediate javascript developer. This book gives you a kickstart, helps you choose the right framework, and architectural choices for your application
Review
The book has a fast pace, no thoroughly introduction of MVC, I think this is justified. MVC has been explained a lot of times the last decade. The author of this book explains a lot of modern frameworks en modern technologies
This book is not for the novice javscript developers even the intermediate developers can have a hard task grasping the contents of this book. You need to understand the core of javascript and jQuery as well as design patterns, at least a couple of them to get the most out of this book.
Personally for me the topic of this book is a bit overkill for the web applications I develop. Hence if the scale of my webapps grows more complex I will definitely turn to this book. It will explain a lot of usefull state of the art Javascript MVC frameworks.
After explaining several ways of working with events in javascript application the author starts digging into MVC. First a chapter on Models and ORM (Object-relational mapping) and how to populate your model with external data. Offline as well as online storage of the model is also described in this chapter. The next chapter is about the controller, the best ways of event delegation and accessing the views. And finally the views itself, with modern js templating techniques. After the MVC foundation Spine.js and Backbone.js are introduced and explained. Two of the most known patterns for small ( spine.js ) to large ( Backbone.js ) web applications.
I also liked to addional information on modern topics like LESS ans CSS 3 and NodeJS. For me this was pure complementary information, and I had rather seen some more introduction in the beginning.
Bottom line
JavaScript Web Application is a must have book to plan and develop larger applications. It tells you everything you need to know to structure a application, but I think it would hjelp to read other book before this book to get the most out of it, for example Javascript Patterns. The books product page
Node.js on Windows part 1: simple introduction
November 11th, 2011 | JavaScript
For a couple of months I was intrigued by node.js, but i couldn’t find any simple guides to start with node on windows. It turns out it is actually very simple to start learning node.js on windows. To start you need 4 things.
- The windows node server, nodejs.exe download at http://nodejs.org
- A hello world node script ( example.js )
- A command promt, set at the same locations as the script en node server
- And of course a browser
Hello World script
Save the script below as example.js in the same directory as the downloaded node.exe file.
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Hello Nodejs</h1>');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
Start your first node script
Now all you need to do are the following steps.
- Start node.exe
- execute the script with the command prompt: node example.js
- browse to the node server wich is running at: http://127.0.0.1:1337/
Your screen should be comparable to the screenshot below

I hope this was as easy for you as it was for me. For now I hope to wire some more intersting blog posts about Node on Windows, for example Node on IIS, but in the next post I will explore node.js a bit deeper
