blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Stuart Preston's Blog

Mostly about Visual Studio Team System, Team Foundation Server, Engineering Practices and Application Lifecycle Management.

Live Departure Boards UK sidebar gadget demo for Vista

I started to look at Vista sidebar gadgets around the time that Beta 2 went public (back in May 2006).  At that time the sidebar itself was pretty buggy - often requiring a complete restart to pick up any changes made to the gadget, and there was no proper XmlHttpRequest support of any use (i.e. you couldn't call a webpage on a remote server).

After coding this gadget in my spare time to demonstrate some of the capabilities of the sidebar, I've had a number of requests to upload it - so bowing to demand here is my Live Departure Boards UK demo gadget.  Quite simply, it shows a list of trains departing from a UK station you choose.  Optionally you can filter by a particular destination.  If a train is late, it will tell you what time it is expected - and if it is cancelled the whole thing will be highlighted in red.

Screenshot: Main gadget with flyout open.

Probably the most interesting thing from a technical perspective about this gadget is that it does not rely on any server-parsed code as its data source.  All the data comes directly from the National Rail website and is loaded directly into a hidden DHTML element of the gadget using a basic Ajax mechanism every 60 seconds (same refresh rate as their site).  The DOM is then parsed to pull out the relevant data into what you see displayed on the screen.  As I essentially rely on screen-scraping, this means that the gadget should be regarded as "fragile" - if National Rail considerably change the structure and layout of the Live Departure Boards website, the gadget will probably break until I release a new version.

Screenshot: Settings page, where you can select Start and Destination stations.

Screenshot: Gadget selection window (drag multiple instances of Live Departure Boards onto your sidebar to watch multiple stations)

Now updated for v0.8: Download instructions: Clicking on this link should download and then prompt you to install the gadget.  Any problems - get in touch using the contact form Link removed pending negotiations with National Rail.

Published 01 February 2007 23:29 by Stuart.Preston

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Charlie Maitland’s Blog Nice to see a Vista Gadget for the UK - Live train departures « said:

February 2, 2007 21:29
 

jamie.thomson said:

Stu,

Are you going to upload it to Live Gallery?

February 3, 2007 19:01
 

Stuart.Preston said:

I doubt it.  I even agonised about publishing it here.  

Whilst I believe I'm not breaking the AUP (http://www.nationalrail.co.uk/times_fares/live_departure_boards/about.htm) - I am quite clearly breaking the condition "You shall not Frame or Rebadge the Web Site, or otherwise integrate it into any other system" (http://www.nationalrail.co.uk/contact/tandc/).

I have written to National Rail, but fully expect a negative response.  So, it is likely to stay as a demo only for now...

February 3, 2007 19:13
 

stevecla said:

Stuart - this is beautiful...I love it!!

Steve

February 5, 2007 21:47
 

Richard Griffin's Blog said:

With the launch of Windows Vista last week, I thought that it would be helpful to put together a list

February 5, 2007 21:48
 

Eric Nelson - Development for .NET Framework 3.0 for ISVs said:

I have been on the lookout for great gadgets for Windows Vista - and in my searching came across this

February 8, 2007 14:03
 

Stuart Preston's Blog said:

After the overwhelming interest shown in my Live Departure Boards sidebar gadget for Vista hobby/demo

February 11, 2007 23:14
 

TrackBack said:

May 14, 2007 18:02
 

The Coffeehouse said:

June 13, 2007 06:09
 

Stuart Preston's Blog said:

Finally I can announce that over the last few months we have been helping National Rail Enquiries in

July 27, 2007 10:39
 

Dave said:

Hi, I read in therailwaycentre. com that it has been finalised. Where can I download this excellent gadget?
August 14, 2007 19:26
 

James said:

Out of curiousity, if one wished for a data feed of these say a large amount of searches made and then have the data save as text on a pc, for email etc, could this be done? is there something in place at all?
September 18, 2007 10:20

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems