My last project at Torchbox: Recycle Now goes live on Drupal 7

The last Drupal site I built for Torchbox went live recently: Recycle Now is a brilliant government-funded service that helps individuals find new ways to reduce, reuse and recycle waste household items, and the designers came up with a brilliant, fresh redesign to accompany its move to Drupal 7:

The build was an experiment in running projects with both a technical and a frontend lead, and from my perspective it worked brilliantly: you'd have to ask Justine if she'd agree from hers. But it meant that I could get the technical side up and running, and then focus on the slightly gnarlier backend and JS functionality, leaving her to work her responsive-layout magic.

Because it's such a widely visited website, performance was really important, and so we wanted as much as possible to go through Varnish, happen in the browser, or be handed off to remote applications. This led to the following technical fixes:

  • Browser-based "search". On the homepage, the "What to do with..." autocomplete is done entirely in the browser, by simple text matching of the DOM elements in the dropdown below it. It worked fine for this limited use, and the main site search is ever-present in the shrunken header anyway.
  • Postcode lookup application. The postcode lookup for kerbside services and recycling centres contacts an existing, separate system outside of Drupal. Because it's on a separate server, and very focussed on one task, it responds well to traffic which can in principle be customized based on any one of 1.7 million postcodes: so effectively uncacheable.
  • Varnish-friendly integrations. The danger with the above is that, given the postcode goes via a browser URL into an iframe, it could in itself break Varnish's caching by requiring 1.7 million unique Drupal URLs for the container page. But the postcode is instead passed as an anchor in the URL┬áso that, although the best user experience now requires Javascript, the actual HTML from Drupal can be cached in Varnish.

Although it was in many ways a straightforward technical build, the challenge was really to keep paring the technical side back, removing or at least minimizing programmatic overhead, so as to ensure that the site could handle what was about to hit it when it went live. I wouldn't say we achieved perfection, but we tried!

All reports from Torchbox Towers suggest that the launch went very smoothly indeed. Which is fitting, really, as the Recycle Now team have matched a smooth site build and a smooth site launch with smooth content skillz, to make a very smooth web experience. I'm proud, and a little nostalgic, to see my last big project all grown up and leaving the nest.