Celtnet: how to make money online
Internet Marketing Make Money Online

Saturday, August 04, 2007

The Importance of Thinking Ahead



I know that I haven't published for quite a while now (almost three months!) but that's partly because of personal evnets taking precedence. Yes, I do have a personal live!

In additoin I've also been working (or should I say re-working) the recipe region of my website. Previously I had static HTML pages and a small MySQL database allowing rather crude querying of those recipe pages. After about 200 entries or so, and where I had hand-crafted links between the pages simple updating became a massive chore. But I perservered, after all I'd written all those pages and the burden of changing the system seemed less than the burden of updating everything.

Eventually, of course, it became plain that to continue this way was untenable. I had to change the system to a database-based system that could be queried using php which could then be used to update the pages and create the content automaticaly. The database design took five minutes, though it tool a bit longer to re-encode my existing pages in a format that both the database and the php could use. Still after a few weeks the re-encoding was done and I could change my HTML pages to use the new system. It took a while to re-encde everything and to point the existing HTML pates to the new php-based ones. As far as the user was concerned nothing had really changed. The pages looked like they had before. But now, I could update the entire system by simply adding a new entry to the database and it was automatically propagated through the entire system.

Rather than being a chore it was now possible to update and add new content simply. Over a month I was able to more than double the total number of entries in the database, and the total number of recipes on my site. Having simple access via MySQL to all the data also allowed me to create new doorway pages to the data, such as my modern recipes listing page or the African recipes listing page or the main course listing page.

It was a great change and should have been done ages ago. It also led me to a way of accessing a MySQL database and using PHP to create a nulti-column table from the values returned. Which I will wirte-up for my code section of the website soon and I'll publish the URL and brief details here.

But to get back to the matter at hand, the salutory lesson of all this hard work is that if I'd spent a couple of days on design at the beginning of the recipe site's inception it would have saved me many months' worth of hard slog and repeating what I'd done before. Now I had a single unified database that allowed full text querying and which also allowed for easy updating and for many different, automated, entrypoints into the data. Learn the lesson that I had to learn the hard way. A few day's design at the beginning will save you many months of re-design and re-factoring when the system becomes too top-heavy to be sustained any further.

0 Comments:

Post a Comment

<< Home