Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread Display Modes
Old Nov 13, 2012, 11:46 AM   #1
macrumors 65816
monokakata's Avatar
Join Date: May 2008
Location: Hilo, Hawai'i
Data-heavy static site -- advice, please

I used to be in the running race timing business (Runtime Services), but shut my company down in 2006. When I was in business, I had a website that (among other things) posted race results. Typically I would post a set of finishers by place, and then a set of finishers by name.

After I shut down, I created a simple site at


and posted various sets of results that I knew the running community would want to see. I promised to someday post the entire archive, and it looks like now's a good time to get to work.

The site's very plain. I don't want to seem too defensive about it, but there's nothing to be sold, I'm out of the business so it doesn't advance me, visitors typically know exactly what they want to look at, they know exactly how to read the listings, and most people visit only a few times a year.

It has steady but low-volume traffic -- a few hundred visitors a day, peaking before big races. It's extremely rare for anybody to contact me about the site or its content, and when they do they're asking when I'll be posting such-and-such a race.

Once I post all my archives, there won't be any new content, and nothing on the site will change.

I need to post roughly 1000 events, ranging in size from very small (under 50 finishers) to very large (24,000+ finishers). The total number of finishers is a bit under 1,000,000.

I ran my company on an Alphaserver running OpenVMS, and that's where I create the listings. It's largely automated. The automated procedures wrap the plain-text results in a very simple HTML wrapper, which you can see by looking at any of the files up there now.

The listings on the site now are in files named according to the rules I used when I was running an active site (now gone). Now that I'm starting from race #1 (May, 1981) I'm using a very simple convention: the race number followed by P (by place) or N (by name). Thus the first race is represented by 0001P.HTML and 0001N.HTML and the last by 1019P.HTML and 1019N.HTML.

At least 600 of the races are from before I was posting results on the web, so I'm having to go back and create new sets of results. It's not too late to change my naming convention, and it's not too late to change the way the results are wrapped in HTML (although I'd rather not do that).

I have a couple of files (which can be seen on the site) listing the races by race name, and in chronological order. For example:


I want to do this is the simplest possible way, because I've got other things occupying my time. But I do want to keep my promise to post the entire archive.

My plan is to use the race-name and chronological files by making each entry a link to the corresponding pair of results (P and N). In some cases there will be four sets of results (I was a "chip" or transponder timer for the last few years, and that means there are "gun" times and "net" times for some events).

At polymorphs I simply created a folder for each group of events (sometimes a race series, sometimes a geographical area) and put the results in those folders.

I think I'm going to need a different structure for the complete archives, and I'm wondering whether having a simple "results" folder with about 2,000 different files in it is a good idea.

I'm thinking of continuing with the hand-coding, because there's nothing fancy or complicated happening (every set of results is in the same font, etc.). I have Dreamweaver and Rapidweaver and iWeb available.

I can write a program to create links in the <a href="1019n.html" . . . mode over on the Alphaserver, automatically, using those two files I mentioned. That would save a lot of typing.

So . . . how would you web people handle this task?

Keep in mind that it's a utility site with no purpose other than to let visitors find a set of results and inspect them.
monokakata is offline   0 Reply With Quote
Old Nov 14, 2012, 08:07 AM   #2
macrumors 68000
SrWebDeveloper's Avatar
Join Date: Dec 2007
Location: Alexandria, VA, USA
Originally Posted by monokakata View Post
So . . . how would you web people handle this task? Keep in mind that it's a utility site with no purpose other than to let visitors find a set of results and inspect them.
No advice will be offered on layout or usability as you made very clear the purpose of your site and user expectations. Based on the link and your description, flat files wrapped in HTML are currently being generated.

Here's a bare bones untested example demonstrating pagination of static content, i.e. simply create static html files named "document-page-0.html" and "document-page-1.html" etc. and paginate manually:

PHP Code:

= (isset($_GET['page'])) ? $_GET['page'] : 0;

$content = include "document-page-$page.html";


$total_pages count($pages);

$prevpage $page 1;
$nextpage $page 1;

if (
$page 0)
$page $total_pages 1)
$page_div ' | ';
$page_div '';

"<a href=\"?page={$prevpage}\">Prev</a>{$page_div}";

if (
$nextpage $total_pages)
"<a href=\"?page={$nextpage}\">Next</a>";

Note: If 2,000 lines are all in one document, you could manually edit and add in a simple token such as "{newpage}" and adjust the above script:

PHP Code:
$page = (isset($_GET['page'])) ? $_GET['page'] : 0;

$content "Hello, World!
Hey! A new page...
Another too!
Umm, bye!"

$pages explode('{newpage}'$content);

The object, however, is to ensure 2,000 records don't load all at once on every page for all users. So the key is to split the data into pages and paginate, no doubt. FYI - In most situations like this, the data is in a database which is then queried to return one page at a time via pagination. The query result (data) is wrapped within next/prev page form controls in HTML. PHP/MySQL in Rapidweaver could handle this for you if the data can be inserted into a database. Obviously this requires a LAMP based webhost and you'd likely use Rapidweaver to create a PHP/MySQL sandbox for development and testing using MAMP.

Regardless of database or static file, I found one library I think will help you a great deal --- an Ajax/Pagination solution which will speed up your site and load pages dynamically:


Of course the example code is intended to integrate with a database, as I explained above it is the most common solution. But looking at the code, you could replace the database stuff code that gets rows from your static HTML file which has all 2000 records. The logic is the same, just a different source. So basic PHP knowledge required to open a file, load x lines, maintain offset, integrate into Ajax. Best of all worlds, only one page loads at a time, very minimal impact on site.
Jim Goldbloom
Sr. Web Developer, owner GoldTechPro, LLC
SrWebDeveloper is offline   0 Reply With Quote
Old Nov 14, 2012, 08:16 AM   #3
Thread Starter
macrumors 65816
monokakata's Avatar
Join Date: May 2008
Location: Hilo, Hawai'i
Thanks very much.

I'm replying before looking carefully at your suggestions. I was beginning to think that my task was so uninteresting that no one would respond. (I do understand that it's not very interesting in fact.)
monokakata is offline   0 Reply With Quote

MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Core data advice? cpuin Mac Programming 0 Sep 24, 2013 11:13 AM
Resolved: Advice in heavy rebuilding/upgrade iBook SE phoenixsan PowerPC Macs 12 Mar 21, 2013 12:35 AM
Advice on data model for new app mkmDesign Mac Programming 3 Oct 7, 2012 05:01 PM
Can you share your tips and pieces of advice about this site? elsiecristensen Buying Tips and Advice 0 Sep 28, 2012 07:42 AM
potential carrier for iphone: $19 a month for unlimited talk, text, data (WiFi heavy) EbookReader iPhone 0 Aug 1, 2012 02:05 AM

Forum Jump

All times are GMT -5. The time now is 03:10 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC