Always plan for the future

In building this site I have added in a lot of functionality that was never part of my original idea. One such piece of functionality is the ability to tag people to films, an extra idea that I thought I woudl only use for an off big famous star. Well that was the plan but not how it has developed as I have tagged well over 350 different people to films already and this shows no sign of slowing down.

When I developed this I was quite pleased at my simple plan to make it work. I didn't want any other information saved about the person other than their name, so I designed and implemented the creation of url friendly links based on the name field in the database. It was simple enough to pull the name, push it to lowercase then fill the spaces with "-"'s to create the link. It all worked and functioned properly for months until i came to name that had an umlaut. This caused issues because you cant use an umlaut in urls and changing it after creating the link meant that it couldn't match the stored name in the db.

I spent a night working on a work around and got that working and was pretty pleased with myself only to run into another problem a few weeks later, people with a ' in their name. I just omitted these for the sake of making everything work until I conceded and added in a link column in the DB. that way the name woudl be as it should and the link could be different and give a proper look up without having to play about with everything.

The next problem was to create links for all the names I had inputted already and I wasn't doing that manually. So I pulled together a really simple script, re-using all the functions I had written for the creating of urls using the name column. I then added a new update function to add this link to the db and sat all of these in a loop of all the names from the db. a second later, all links were created, I just then had to go back and fix all the names with umlauts and ' in them (there were about 10 in total) manually. Then a quick fix to the admin section of the website to deal with the new column and input and a few changes on the main art of the site when creating and reading/dealing with links and it was all done.

Really do not know why I didn't just do it earlier on in the project even when i first ran into the umlaut issue as it was so quick and simple to do all of this in comparison to finding a different fix for that problem at the time.

>>back<<