01
MAR
Site updates & moved to SliceHost
Posted by Adam Posted in This Site 2 comments
For the last week or so I’ve been working on updating some of the things on this site which really deserved an update. For example, the twitter & flickr feeds both seriously needed a re-vamp – they were stagnant and rarely updating correctly.
Updated Twitter & flickr feeds to use live data
Before, both my flickr and twitter feeds used to use their respective APIs to download new updates using a cron job on the server every 5 hours. This solution worked well enough and ensured the site loaded quickly, however the updates weren’t frequent enough and data was very quickly out of date.
To address this problem, I had two options: firstly, I could have changed the cron job frequency to run every 15 minutes or secondly, I could have re-thought the process entirely… I choose the second.
The twitter feed now uses an AJAX call to a page on my site, which then queries the twitter API (unauthenticated to avoid the 75 requests/hour limit), excludes any statuses starting with an @ symbol, formats them into some suitable XHTML and pops them into the correct place on the page. This AJAX call is initiated on page load so the page is fully loaded before the call takes place (i.e. the site is usable even if twitter is being slow/down). If there are any errors or timeouts from twitter, the errors are caught and a nice message will display instead of my latest statuses.
The flickr feed is much more simple – in fact, it’s just a flickr badge (http://www.flickr.com/badge.gne). I’m not entirely happy with this because it only display two columns of pictures rather than the three I had before. I did consider approaching this in the same way as the twitter method but, as the badge is working nicely, why over complicate things?
New Logo
The original logo was never meant to be a permanent thing, in fact, it was included in the original concept/visual and then I never replaced it before build and it stuck. The new “logo” (and I use logo in the loosest sense of the word – it’s just a typeface with colours!) appears in the top left of the page and in error messages.
Syndicate link removed from navigation
There used to be a link to page which contained links to various RSS feeds (blog, twitter & flickr) in the main navigation, however, after a few moments thought I decided that anyone wanting to subscribe to my feed would easily notice their browser’s RSS icon and click it. The syndicate link has now been moved down to the footer and replaced in the top navigation with a ‘My Projects’ page which will have some details of things I’m working on or have been working on recently.
Moved to Slicehost
If your reading this post, your reading it from my new slice at Slicehost. I signed up for a very basic 256MB slice at the weekend and, so far, things have gone very smoothly – Slicehost have really figured out the right way to do virtual server (VPS) hosting IMO.
One other change…
There is, of course, one other quite signifiant update however I will post something about this in the next day or so.
Comments
Add a Comment
SarahG says....
For your Flickr Badge you should be able to get the javascript which just prints your photos in a line, then you can use CSS and a surrounding div to float the images left and control the column number by the div width.
At least that’s how I do it :o)
Posted on Sunday, 02 March 2008
Adam says....
Hi Sarah – I did think about that – in fact I did something similar – but the square images from flickr are too large to fit three in a row. I could use some CSS to crop them down to fit in the column but I was feeling a little lazy and I’m not unhappy about the way it has turned out. :)
Posted on Monday, 03 March 2008