Posted by rayui on January 15, 2012
I’ve completely refactored my NodeJS/Backbone tutorial. The front end code is much cleaner and easier to understand and I’ve removed the server’s reliance on Backbone, which isn’t suitable for server-side use. I’ve buillt a shared client- and server-side validation module; created proper routing, including 302, 404 and 500 responses; rewritten the CSS so it looks pretty and updated the README file to match the dependency and installation instructions. I’ve also included updated package.json and proc files so it’s ready to run on Heroku. Just set up your app, clone the repo from github and push. Oh, and it generates its own documentation using docco. Wow.
Posted by rayui on November 23, 2011
I’ve been using Backbone JS daily as part of my day job for about three months. I’ve learned a lot in that time and have found it to be very effective at what it does. Whilst I am now much more comfortable with the framework, I had some false starts and I found the documentation slightly intimidating for a noob! Whilst I appreciate that this is in part due to the philosophy behind the software, I would have loved a structured tutorial with an accompanying “Hello World” example.
The problem with “Hello World” is that being an application that outputs only one string, it’s not really suited to a demonstration of MVC techniques which require slightly more dynamic data sources. Instead, I decided to write a simple calculator web server that multiplies two operands supplied by the client and returns the result. It demonstrates the basic principles of MVC on the client using both JSON and traditional form submits. It also has a script to generate its own documentation web pages from the source code, which are served up as part of the tutorial application.
The frontend is written in Backbone, jQuery and HTML5 and is served by Node JS using Express, Backbone, Jade and Browserify. All the documentation is generated with docco and it comes ready for deployment to Heroku.
Fork the code on github
Check out a live demo on Heroku
Posted by rayui on September 3, 2011
Custom Select Rage
I produced a presentation for LBi‘s Technology Department Show and Tell sessions. It describes the problems I faced producing Flyweight jQuery Custom Select and how I overcame them, giving a brief summary of the techniques used and a breakdown of the plugin’s eventual performance. Sadly the presentation wasn’t filmed but I do have the slides, which LBi have kindly granted me permission to share with you.
So, without further ado I present you with Custom Select Element Rage. I hope you enjoy reading as much as I enjoyed making it…
Custom Select Element Rage (Open Doc Presentation)
Custom Select Element Rage (Powerpoint Presentation)
This presentation was originally given on 26th August 2011.
Posted by rayui on July 18, 2011
Check out the theory behind the flyweight design pattern.
Added an unstable branch and live demo to the github pages. All branches, including the live demo, are now implemented as a jQuery plugin.
Posted by rayui on July 18, 2011
My colleague Rob Greville put together a retro Track and Field game which uses the HTML5 canvas. I am hosting it for him on isittheolympicsyet.com.
Posted by rayui on June 14, 2011
John Resig Reddit Rage
Posted by rayui on May 19, 2011
3D QR Code Clock screenshot
A colleague of mine and I at LBi London
. Epic? Just a little bit!