I love it when two of my favorite activities collide – in this article, I describe how I created a Runner’s Training Calendar using jQuery, PHP and MySQL. You can see the work in progress training calendar here.
Running long distances is something I’ve had a love-hate relationship for many years. There’s nothing quite like the feeling of satisfaction you get from setting goals and achieving them – the kind of goals you set when you make a commitment to participate and complete a road race. Whether’s its a marathon, half-marathon or even a 10 miler, the feeling is just about the same – elation. That feeling certainly doesn’t come easy, however. You’re constantly fighting weather, colds and that ever-present feeling of laziness.
That’s why I try to use every tool available to my advantage when planning for a road race or event. Up until recently, I would create a work-out or training program using several online tools, magazines, and a few books I’ve read. One of the tools I relied on to help me plan my training calendar recently stopped working. It’s really a simple concept – a training plan consists of a series of sequential instructions – day 1 run 10 miles, day 2 – run 5 miles, day 3 rest, etc. The tricky part is that you want to be able to cast this sequence of days over your current calendar and time it perfectly so that you complete the training program just in time for your race or event.
I figured it couldn’t be that difficult to take any existing plan – say, Hal Higdon’s Intermediate 15k Plan and load that into a database. Then prompt the user for the race date and simply count backwards and present the user with a schedule of activities leading up to the race.
Well – that’s exactly what I did.
I found an excellent jQuery plugin called fullcalendar that did all the heavy lifting for me. I just created the mysql schema to store the calendar programs, added some php to drive the site and blamo – instant training calendar.
Work in Progress
You can see the work in progress here. If you do try the program, let me know how it works as I can always use the additional testers 😉
How to Use This Tool
- To use the tool, simply select the Race Type from the drop down – currently there are 3 Types of programs – a 10 Miler, a Half Marathon and a Marathon.
- Then, select your expertise level from the drop down – Beginner, Intermediate or Advanced.
- Next, you specify the race or event date – clicking the calendar icon will make this easier.
- Now click “View Training Program” and your customized training plan should display showing you what activities you should be performing each day until race day arrives.
Currently, all of the programs are from Hal Higdon, but I’ll be loading additional ones as I have time.