Back

The Racehorse - Bloodstock statistics

Author- Julian Blundell, w34u
Published. Thursday 28th Nov 2019, Updated. Friday 17th Jan 2020

The racehorse - bloodstock statisticsThis project is designed to generate reports on bloodstock information for race horses. Ten years of results from races, sales and stud fees are analysed to generate reports which will allow horse breeders and owners to gauge the possible worth of foals bred from various sires and dams.

I have spent a large amount of the last couple of years developing this site and have really enjoyed the process.

See the site.

The site was originally built in Drupal 4 and has a data import back end in bash script, also there was a lot of racing news and other content which is not needed on the new site.

See a pdf of a black type report here.

The process to update the code base to modern standards and improve the bloodstock data was as follows:-

  1. The old code for report generation was extracted and put into models and helpers, any embeded HTML removed and old syntax updated to stop all the warnings, notices and errors.
  2. Controllers and views were developed to display the reports in clean standards compliant HTML.
  3. The back end bash import routines that handle new race, sales and stallion fees were updated to work on modern servers and databases, the originals having been developed on spark servers.
  4. Report PDFs are generated from the HTML using specialised style sheets and an external service.
  5. Payments for the reports are taken using a multi-currency external service which extends Stripe payments.
  6. Additional reports have been developed to give clients better information on foal purchases.
  7. Semi-manual routines have also been developed to clean up the horse bloodstock data thus giving a much more accurate results.
  8. The site was made mobile friendly.

The main technologies used to replace Drupal were:-

  • Codeigniter - a light MVC framework which handles buggy old code with resilience.
  • jQuery and jQuery UI for the clean JavaScript needed for the functionality.
  • MariaDB - Open source database compatible with MySql.
  • Bootstrap - implement mobile friendly web pages.
  • Composer - easy external PHP library version control.
  • SSP - hardened session and auth handler

The process of improving the the site is still ongoing with additional reports, data cleaning routines and an API to share the information coming in the next year.

Back