Web Programming

Journal of a redesign

With today's post I'm going to start profiling some hints and tricks for migrating an existing static website to a new site managed by a content management system. As it has been for the last few dozen projects I've worked on Drupal is the content management system of choice.

Background

The website in question started as a small collection of web pages. Early on (sometime before I got involved) the choice was made to use server-side includes to provide a semblance of control on the design. Over and over files were created and pages added. According to Google there are now roughly 2,600 entries for this site in their index.

In the early days of the site there was a dilemma. Since there was no content management system where people with information could make it available to users they had to send it to the webmasters. This quickly becomes a resource drag and the information suppliers are then told to put their information in PDF documents. With this history, the one-page PDF is more common than it should be. Much feared, the one-sentence PDF also makes frequent appearances.

The need for some automation drove the connection of several Microsoft Access databases and a small number of PHP scripts. With several processes left half-baked what should have been a help offered little assistance. Instead of posting a single-sentence PDF directly, the process grew into a series of e-mail the PDF, a webmaster posts the file and copies and pastes several entries into an Access database. Since that didn't cause enough problems there is then a step of FTPing the Access database to the server. The server uses ODBC connections to other data sources, but for this particular process they were never setup.

Category: 

How to create really annoying databases

Microsoft Access is at once great and the scourge of my existence. It has great power to create databases quickly and for small organizations it can be very handy. However, it also makes it easy to create databases even if it's something you really have no business doing.

I'm working on a couple of inherited projects now and there are two very annoying things. One of the annoying things is to create quasi-relational tables with no normalization. Put as many columns in as possible and repeat them in as many databases as possible. If that doesn't do enough for you copy the database a hundred times and create separate versions of it.

The other, almost more annoying practice, is to create one of these monster tables. Then instead of having your PHP script run queries on the table you create a query in Microsoft Access and run the PHP queries against the MS Access query. For annoying bonus points, rename three of the 40 fields so you have "Username" instead of "User". Repeat.

Oy.

Pages

Subscribe to Web Programming