A beginner's guide to choosing the basic architecture of your web site.

(Static Pages, CSS, or Dynamic Pages) 

One of the first decisions you need to make with putting together a website is related to the technology you will use for your site. The main choices for amateur web developers include static self-contained pages, static pages using CSS, or dynamically generated pages. Below I provide some brief descriptions of these technologies and why you would or would not want to use them for your site. Keep in mind that you should make this decision before choosing a web host. This is particularly important with dynamic websites since you will want your hosts technology to play nice with the programs you intend to use. 

Static self-contained pages. 

Originally (well maybe not originally originally , but recent originally ), websites were a series of static html web pages. This basically means that you put together each web page as a standalone document and include some hyperlinks to link the documents together. All design elements (such as menus, fonts, page layouts, but not images) were contained in each page along with the content. Once you had one or more pages put together, you just uploaded it to the web server, and you had a website.

My first web site was (and still is) made up of static web pages. On the plus side, you could have a small site of a few pages published very quickly and didn't really need to think that hard about what you may want to put on the site in the future (organization of the site), since you could just design new pages and add them whenever you wanted. You could even have every page look completely different from the others on the site. 

The down side of a site made up of static pages is that if you didn't spend the time up front to really plan things out, it can end up being a bit of a mess, and over time, the web evolves and you would probably like your web site to evolve along with it.  For those of us with old static page websites, it means we need to go back and redo all the pages on the site in order to upgrade the look and feel of the site.

Static pages with CSS.

It quickly became evident that there was a need to have better control over the look and feel of websites. And a logical solution would be to separate the content of the site from the design elements of the site. This basically means that a website has a central place for all the design elements of the site (fonts, font size and color, page background colors, page elements such as menus and banners, etc). If you worked with "styles" in word processor programs, you should have a basic idea of separating the design elements from the content. As an example, rather than going through your document and changing fonts, font sized, font colors, for specific sets of text on the page to get the desired effect, you would create styles and assign these styles to specific sets of text. So, instead of going to the text that is subheading for a section and making it a larger font size with Bold and as specific color applied, you would create a style (probably called Heading 2 or something) that had the appropriate font size, bold, and color, and then just assign this style to all your subheadings in your document(s). This way, if you wanted to change the look of the document, you could just change the style of Heading 2 and all the text with this style applied would display with the changes. 

Which brings us to CSS (cascading style sheets).     CSS it the widely accepted standard for maintaining these design elements with websites. A website made up of static pages that use CSS allows the separation of design elements from content. Basically, the static pages uploaded to the server only contain content  and references to the CSS that will be used for the site. When a site visitor goes to view a page, their browser will combine the content from the web page with the design elements from the CSS template and display the page.

Creating the CSS that makes up the template for a web site, can get rather complicated and is probably beyond the time investment that  most amateurs (myself included) are willing to make. Fortunately, CSS-based templates are readily available (many free) for download. And though creating one from scratch can be a serious undertaking, doing slight modifications to an existing one is not that big of a job. 

All you need is at least some basic knowledge of CSS (that's the hardest part), and a text editor to edit the CSS files.   But you may find using  web design software such as Adobe Dreamweaver , Microsoft Expression , or even free programs like NVU  or KompoZer , will make the job easier. 

When you use CSS, you don't give up any design capabilities you had with your self-contained web pages. In fact, you can still apply special formats to the content of specific pages. This basically acts like an override to CSS and is not really recommended since it essentially leaves you with formatting contained in the page itself that may come back to haunt you later if you decide to change the look and feel of your site.


Dynamically created web pages.

The next option uses CSS as previously described, but instead of creating individual static pages that contain the content, the content is maintained in a database, and a program is used to extract the content from the database and basically assemble a page when it is requested from the site visitor's browser. These are known as Dynamic Web Pages .

Someone new to web publishing is generally not going to even consider building a database-driven site from scratch, but fortunately you don't have to. There are numerous programs available that can be used as a database-driven website. Note, that I did not say these programs are used to create a database-driven website. The programs essentially are the site. And what's really nice is that the most popular of these programs are free (open-source products such as Joomla , Mambo , Drupal , Mediawiki , Wordpress , etc). 

What's nice about using these open-source products for a database-driven site, is that the program will contain a lot of functionality that would be difficult or impossible (especially for us amateurs) to duplicate in a site based on static pages.  For example, on this site (based on Joomla content management system), I (or others I authorize) can add or edit content from any computer that has a web browser. Technically, there are ways to do this with a site based on static pages, but it's usually not near as easy. The most popular open-source products also have a strong user and developer base that provide additional functionality known as extensions that can be added to the site. For example, I could download an extension that would allow site visitors to post comments on articles on this site. 

On the down side, database driven sites require that your site uses a database and programming language on the web server. So setting up and maintaining these sites can be a little more complicated (though it's getting much easier), and the speed of your web site now not only depends on the bandwidth your host provides, but also the speed of the database and the code execution that must occur to display your pages. In addition, there is a lot more that can go wrong with your website. With my static page web sites, I've had a few occasions where my site was down, but that was due to the host's web server being down and it was for very short periods of time. But with my database driven sites, a change the host makes to the server (like changing the version of apache, php, or mysql) can knock out your site and it can be a royal pain in the ass getting your host to undo what they did (or even admit that they changed anything) or figure out how to get your site to work with their changes. Another issue with database-driven sites, is the formatting of the page URLs. These are basically the web addresses for the pages, and with these types of sites, the URLs tend to not be very user friendly or search-engine friendly (having long urls with programming code like "index.php?option=" stiuff in the middle of them. Fortunately there are ways to rewrite the URLs, but this functionality varies based on the specific product and the setup of our web host's server. Things are getting better in this area, but it can be a big concern when setting up a new site or converting an existing site since you never want to change a page's URL once other sites have created links to it (and search engines have indexed it).

One note on using these programs for your website. There are a lot of web hosts that will install these programs for free as part of your hosting account (or they have a nice little control panel that allows you to install it yourself), but unfortunately, they don't usually do upgrades for you. So ultimately you will need to learn how to install and upgrade the software, so I recommend installing it yourself from the start. Plus, the versions the web hosts install sometimes are not even the current version. Also note that installing, maintaining, and upgrading these programs is not as easy as installing a Windows Program on your desktop. The more popular programs tend to have better help available on the web, plus they are also more likely to have books available that can be very useful especially if you are new to these types of programs.  

I guess I should also mention the little "site builder" features offered by some web hosts with your hosting account. While these can be handy for putting together a quick, very small, website, they generally don't allow much control over the look, feel, and functionality of a site. They also generally do not allow you the ability to move the site you created to another host, so if you decide to change hosts, you're basically going to be starting from scratch  setting up your site.


In the end, I'm really liking database driven sites. With all the great open source programs available for database driven sites, I can get a better looking, much more functional site than I could make by myself using static pages, or static pages with CSS,  plus I can keep the site up to date with current technology, functionality, and design elements. That being said, the URL naming issues with these programs can be problematic, and until some of these issues get worked out, I will likely be going the static pages with CSS route when I get around to updating my existing static page websites. As far as self-contained static pages goes, I think it's time has passed for anything but maybe a one or two page website.