July 27, 2008. The blog homepage.

Train times on your iPhone

At this week’s OpenCoffee Club I demoed a small application that shows train times on your iPhone that was warmly received — thanks guys! This blog post introduces the application and some features.

I use the commuter train service quite a lot. I don’t have a regular commute, so a lot of my journeys are at random times between random stations. Knowing which stations are nearby, I want to know how I’m going to get from where I am to where I’m going to.

The Irish Rail site doesn’t provide a satisfying experience on your iPhone

Why not use a printed timetable? I rarely have the foresight to bring a printed timetable with me, and even if I did, I can’t stand them. The timetable for my line (the Maynooth line) unfolds to over A4 size, and includes not only the current schedule but a previous one. It’s irritating to use. It also only includes trains on my line; if I want to get to Greystones, I’m screwed.

Why not use the Irish Rail site? Well, although the site gives you a lot of information on your journeys, what it doesn’t give you is a satisfying user experience:

  • The form is optimised for ticket reservations, which cannot be made for most trains. If I forget to click a radio button, I am given an annoying pop-up.
  • The station selector (the “Stations” link, which uses a pop-up) doesn’t work on the iPhone at all.
  • Without the station selector, your only option is to type in the station name, which must be done exactly. For example, “Leixlip Confey” doesn’t work; you must type “Leixlip (Confey)”. Typing in the wrong station name will give you two contradictory error messages (one as a pop-up, and one on the page itself).

After seeing a train times app by Magluby, I decided to create my own app that did the same thing but with an iPhone-optimised UI.

As an aside, I think Magluby’s app is your best choice if you don’t have an iPhone.

The new application

Screenshots from the iPhone trains app, showing the home page and the station selector

Screenshots: Shown above are, on the left, the homepage with two saved searches and, on the right, the “From” screen with station selector.

The train times application can be found at http://antidis.com/demos/trains

To find your times, just tap on “Find train times…” and choose the station you’re coming from, the station you’re going to, and the day of travel. You can skip between stations quickly by tapping on one of the letters up the top of the page. Results are generated from live data coming from the Irish Rail site, so it’s always the latest available information

You can view any station changes you’ll need to make by tapping on the “Details” link. If you search for times today, any trains you’ve missed are automatically hidden; you are shown only the trains you can actually used. If you want, you can always display them again by tapping the link at the bottom of the table.

Saved search is also pretty cool; clicking on the “Save this search…” button under your results will save this search to the homepage. I make a lot of journeys between four particular stations, so it’s handy to be able to find these times even more quickly. Every search you save will show you today’s times for that route; if you want to see another day’s times, just click on the day button in the top left to select a new one. In fact, any search for today or tomorrow is rolling, so if you make a Mobile Safari bookmark for tomorrow’s times, that’ll update every day too, always showing you tomorrow’s times.

It also has a crummy and unimaginative little icon (Irish flag! Train!) that nevertheless does the job.

Future features and feedback

I hope to add some more features to the application. This week I’ll be adding the ability to see your search results on the Irish Rail website (which does give you more detail), and I hope to make a few more changes (like improving the parser and the text) as time goes on. I’d also like to add support for managing saved searches; at the moment, you have to clear your cookies to get rid of them.

If anyone has any comments or suggestions, please do so here and I’ll consider them.

The URL again is: http://antidis.com/demos/trains

This is an Article. It was posted on July 27, 2008.

4 Comments

  1. David Barrett on Aug 9, 06:52 pm

    I’ve added the feature to perform the search on the Irish Rail site (in case the parser breaks) and fixed a bug where the name of the month was actually the month after.

  2. David Barrett on Aug 18, 09:45 am

    I’ve found that sometimes searches don’t work the first time, but a refresh can solve that. I’m pretty sure the fault is on Irish Rail’s site, but will be working to verify this and (if possible) work around it.

    In the mean-time, if your search result returns no results, hit refresh a few seconds later or, alternatively, tap on the link near the bottom of the page to perform the search on Irish Rail’s own site.

  3. Dave Jeffery on Aug 22, 07:15 pm

    Love it, this is going on my home screen. My clunky fingers find the letter selector buttons a bit small though. Also, perhaps you could use window.scrollTo(0,1) to scroll past the address bar on page load and make the app seem more native.

  4. Wal on Aug 24, 08:55 pm

    Hi David

    Just wanted to say thanks for the great app … So handy to have the dart times this way .. Right off my home screen…

    Nice one!

Commenting is closed for this article.