thetrainline.com

About the thetrainline.com

This site is a 'TV site', accessed on Sky's new interactive E-business portal. The site is an iDTV site which offers the same functionality as thetrainline.com website. The site is part of a package aimed at enabling customers to buy train tickets through other media, including mobile phones and Sky's interactive TV service.

The project was completed on budget, with myself as sole developer for the entire project. The front end of the site was rendered in WTVML, the back end using PHP 5, MySQL, and SOAP to make requests to thetrainline.com middle tier.

The main menu / the station lookup facility

Objectives of the site

The site offers a high level of functionality through an intuitive user interface. The site functionality includes the following:

  • Station search to enable quick entry of station names
  • Time table look up for single and return journeys
  • Earlier / Later functionality when viewing a timetable
  • Adding a railcard / multiple travellers on a journey
  • Avoiding, or going via a station
  • Information about full journey details
  • A full booking process including delivery options
  • Full transactional interface to enable ticket purchasing
  • Live departures / arrivals screen
  • A 'My trainline' section giving recent journey details, and personal details.

Choosing outbound times / timetable results

Meeting the objectives of the site

Such a large project required good planning, a flexible framework, and a good development process. These requirements were acheived through writing a small MVC framework, using the smarty templating system as an output. This enabled a very stable, scalable project.

Choosing return times / A journey summary

The site is rendered in WTVML, however by detecting the browser it will also render HTML templates for testing and debugging.

Initial stages of the project involved creating all the WTVML templates for sign off, ensuring they met the stringent technical requirements of Sky.

When a form is submitted on the site, it's contents are compiled into a SOAP xml request, and is posted to a Content Middle Tier which responds with appropriate data in an xml format.

Choosing delivery options / Confirming a fast ticket station

The most complex aspect of the project was creating the timetable screen with it's associated fares. The data to represent this comes in 3 parts in one large xml response, this includes a timetable, a set of fares, and lookup data matching the timetable to the available fares. To convert this to a manageable format, the xml is parsed and processed using simplexml into a multi-dimensional array, giving a real world representation of the timetable, and of what tickets are available at what times. This array can then be parsed, and the output rendered to screen. Using this format enables total flexibility in the back end, whilst disassociating it from the front end. This meant the layout and functionality of complex pages could be changed without compromising the stability of the application.

Entering a CCV number to complete a purchase / A complete transaction

Certain requests, such as a timetable request require almost 1mb of data, therefore each request is cached, and a session handler is used to help manage the data.

To enable effective debugging and monitoring, logging is used to report any errors, detailing in full any relevant SOAP transactions.



Affiliations

Member of drupal.org Member of drupal