Battrick
Existing Setup
Battrick is an online cricket management game that has been running since April 2005. The first 3 years of development was done by one person who had no formal training or experience in coding, and he learnt as he went along. While the result is therefore quite an achievement, it means that the codebase at all levels makes it far trickier to bug fix and add in new features than it really should be.
The challenge was to take the current development and introduce new ways of working to ensure stability and organisation, simplification and improvement of code to ease maintenance, and features for end-users that enhanced their game-playing experience.
My Improvements
The input I’ve provided has been varied in terms of the areas they cover. I’ve added in gzip compression, caching and other changes to the web server to improve performance and reduce loading-time. Some static files are now served from a sub-domain, which will ultimately be behind a new domain to enable cookie-less domains.
Indexes added and removed after database analysis has resulted in improved performance and storage of data, allowing greater flexibility of the output. The already comprehensive number of stored procedures has been added to, while new tables for new features have been added and existing tables have been adapted to be more normalized.
At the ASP level, all files have been reorganised to provide ease of maintenance, and logical grouping of code. Many common bits of code have been encapsulated into functions, subs and classes to ensure consistency and reduce coding bugs. Coding standards have been partly developed, and the use of SVN versioning now ensures edits can be tracked.
The site still (at the time of writing) uses frames in it’s HTML output, but work is in progress to remove these. The site recently switched to using utf-8 character encoding, and some of the pages do now validate as XHTML 1.0 Transitional. The site is known to have several blind users, and users who access via mobile browsers, as well as older browsers such as IE6, so accessibility and usability for these free and paying members is important. The CSS styling has been reduced from five browser-specific and mostly-duplicate .css files down to 1 main file and another one for IE.
Even with all the problems at deeper levels of the site, there has been some work on removing the requirement for JavaScript for the site to work, and making existing scripts unobtrusive. Previously, JavaScript was needed to load both the menu, and add in the browser-specific style sheet! The library has been switched from Prototype.js to jQuery, and all scripts and style sheets are minified on the site.
As well as a new admin blog on the site, it also incorporates a feed from the new Twitter account, and community is extended outside of the site via the added Facebook page.
Future
There’s still an awful lot that could be done with the site, but as it’s a project on which I’m an unpaid volunteer, work is slow to progress. Half the battle is fighting the existing codebase, something which I suspect would only be solved by a complete re-write.

