Previous | Back to portfolio | Next
Square Haven
In Summer 2003 I launched a project that would convert gaming website Square Haven to a more accessible, standards-based design using CSS for presentation. Given the size of the site, a lot of backend PHP code needed to be rewritten to be more flexible, scalable, and generic, as well as abstracting code for writers and providing ample instructions for co-developers at the site.
Prestigious gaming website Square Haven, which has existed for over seven years, was suffering from inefficient server-side code and HTML, which caused problems with memory usage on the server and caused pages to load more slowly for users than they could, as well as cause bandwidth consumption to be higher than it should. I set to work to rewrite the underlying code-base of the website, as well as reorganise the HTML output, and seperate presentation from content to resolve these issues.
Together with Matt Berti and Paul Le, two of the more technical staffmembers of the site, we started rewriting the most visited pages of the site to be compliant with XHTML 1.0 Transitional and deliver content with better, semantic markup. The goal was to provide new code without changing the overall appearance, so that the changes were transparent to the user. Nevertheless, the bandwidth consumption and caching by the user's client had to be reduced. After completing the initial rewrites, we came to the conclusion that our efforts had reduced HTML by 70%, and transferred most of the presentation information into a 20kb CSS file that would only be loaded once by each unique user, instead of for each page.
The effect of this optimalisation resulted in much faster-loading pages throughout the site, as well as more centralised management of the code (PHP was now object oriented and therefore manageable from a core module of files; HTML had been reduced to only include the necessary semantic markup; CSS now generated all design elements from a central stylesheet with the option for additional stylesheets for specific sections of the site). This process also taught Paul, Matt, and myself more about the challenges present when moving a table-based website design to CSS/XHTML, and as such, we were able to learn a lot from it and its practical uses and limitations.



