RSWC Tutorials & Essays


The internet was created to share information and learning between people all over the world. Here I carry on this tradition by regularly publishing tutorials covering various topics in web development and software engineering.
Dynamic Database Switching in Rails - How to do it

If you have an application you offer as a service to others, youʼre going to run into the problem of needing to keep data separate between your customers. You will want to do this as efficiently as you can, with as little code as possible.

Wufoo is a good example of this kind of problem, where every user of their service sees the same application and uses the same tools; but by giving each user their own unique URI they are easily able to segregate data between users.

A variation of the fairly straight forward method I describe in this Tutorial has been live since 2007 in a web application developed by PCCL. It has proven to be fast enough to deal with the load of being in daily use by thousands of unique people. The original version of this code was written by my colleague Mark Somerville and this is heavily based on his brilliant work.

  • Ryan Stenhouse
  • Sunday, February 07, 2010
Creating a Jobby Freelancer
As Jobby Rails was built to be a drop-in replacement for the version of BackgrounDRb we were running. As such, we designed worker classes called Freelancers to instruct Jobby on how to run tasks required.
  • Ryan Stenhouse
  • Monday, January 11, 2010
The Basics of CSS - Part 1

This is the first in a series of tutorials, designed for the complete beginner to standards-compliant and accessible website development. In this tutorial, I am to give you, the reader, a basic understanding of CSS (Cascading Style Sheets), and an appreciation of its role in making the web a prettier and more accessible place.

  • Ryan Stenhouse
  • Wednesday, November 11, 2009