Categories » Web Development

WebSocket sessions in NodeJS with Express

WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. However, keeping track of sessions in both HTTP and WebSocket…

Continue →

Automating local hosts

Setting up a new local host is a familiar task to most web developers, updating /etc/hosts to include yet another local domain, and potentially updating Apache config to recognise the new server. This process can be made much easier in several ways. Apache configuration The easiest way to not have to deal with basic Apache…

Continue →

Deferrables

Imagine, if you will, some JavaScript models that look something like this: function User (…) { // initialise user } User.fromId = function (id, cb) { // 'returns' an error, or a User db.find(…, cb); } User.prototype.getGroups = function (cb) { // 'returns' an error, or an array of Groups db.find(…, cb); } function Group…

Continue →

<noscript>

When I was but a fledgling web developer, JavaScript was a toy; a little bit of DOM manipulation (or DHTML, if you will) was about as good as it got. It certainly wasn’t being used to make full-blown client-side (or indeed server-side! 1) applications, and if you told someone you were going to generate all…

Continue →

A little journey into touch events and transitions

I’ve been doing a bit of R&D into some badge-related mobile stuff, and playing with touch events to get some swipe-like behaviour. While this is more of a gripe than a tutorial, I’ll go through the process anyway, for those of you following along at home. First things first, we have to listen for a…

Continue →

Expanding your toolset

The world of web development is growing at an ever-increasing rate, and every week I read a blog post or an email exclaiming how it’s such a struggle to keep on top of it all. It’s not hard to find a similar number of articles telling us how to go about staying up to date,…

Continue →