Everything is connected!
cdtconnections.com
Main Menu Web Design
Flat File Web Sites

This web site is a "flat file" site. Instead of using static HTML for the browser to "parse", it uses a language called PHP. Among other things, this allows the site designer to assemble the pages of the site from several different files. When you look at this page for example, the header across the top is one file, the menus are separate files and even this text you're reading comes from a text file. The file named "web-design-flat.php" is actually a set of commands sent to the PHP software on the host server, and it's the PHP program that generates the results in HTML for your browser to parse.

Why do that? Why not just write the HTML?

The fundamental difference is that PHP allows, among many other things, interaction between the various files composing the page as well as automating many other tedious processes. For example, if I want an image gallery and built in HTML, I'd have to write out the entire table, embed the thumbnails and create links from those thumbnails to the images. With PHP, one script can do all that automatically AND generate the thumbnails. As I add photos or images to the gallery directory, the PHP script sends the list of files to the PHP program with instructions to build the table and generate the HTML.

There are literally thousands of things that can be done with PHP including but not limited to event calendars, guestbooks, text editors, site managers, etc.

OK... so there's some of the advantages... what are the disadvantages to a "Flat File" system? The biggest drawback would be that it doesn't link to a database, instead relying heavily on generating text (.txt) files and refering to them when generating the page. This in turn can lead to slow load times as the PHP software searches through the sites directories to assemble the page or write new text files. It can also be a bit confusing to find the right text file when employing a text editor to do site updates.

Personally, I believe the advantages far outweigh the disadvantages and I now work in the "Flat File" format more than any other. It gives me greater flexibility while avoiding the security risks asssociated with using database. For more information about PHP and databases, see the CMS description page.

Web Design Main Page
Static Flat File Content Management
Contact Info

< < web design intro   |   gallery   |   live sites   |   prices >>
home    |    the designer    |    web design    |    graphics    |    articles    |    contact info    |    links

© Copyright 2009, cdtconnections.com
All Rights Reserved