Static Vs. Dynamic Sites
Static Web Site
In a static web site, each page you see in your web browser exists as a distinct page of XHTML, just as each page you read in a book or magazine exists as a printed page. If you want to change a sentence on page 7, you edit page 7. If you want to change a sentence on every page, you edit every page.
Dynamic Web Site
In a dynamic web site, the page you see in your web browser has been assembled on-demand, using a set of coded instructions. Think of a bulletin board and a box of flyers, business cards, and post-it notes. The bulletin board starts out blank. You assemble the “page” of content by pulling the items you need out of the box and arranging them on the board. You can change the board’s content in hundreds of ways by posting new items from your box, swapping one note for another, rearranging content, or removing items altogether. But there is only one bulletin board.
In a dynamic web site, your content is stored in a database. Web pages are assembled by pulling specific content from the database and assembling it according to coded instructions. The page is then formatted and styled by applying CSS rules.
Why build a static site?
Static sites are constructed in a relatively simple way. A page is a page is a page. There is no dependency on a database or coded instructions, and the pages can be edited using software such as Adobe Dreamweaver or a simple text editor. Pages generally load quite quickly.
If a site is purely informational, relatively small (up to a dozen pages), and does not need to be frequently edited, then a static site can be a practical, affordable solution. A site that is essentially an online business card, for example, with a handful of pages that change little over time, could be a good candidate for this approach.
In the early years of the world-wide web, and for much of the last decade, most of what you saw on the web were static pages. However, today’s readers are accustomed to a much more interactive experience, and this is difficult to create with a static site. Search tools, blogs, RSS feeds, news listings, topical indexes, user-logins, integrated calendars, pages that change their content to suit a specific viewer… all these are features that have become much more common in today’s sites, and all are difficult or impossible to produce in a purely static site. Today, many of the sites you see, from Amazon and Facebook to corporate intranets and small business sites, are dynamically created
Benefits of a Dynamic Site
If a site requires some of the interactive features I’ve described, needs to be updated frequently, contains more 15-20 pages, or has a large amount of information to convey, then it’s likely that a dynamic site is the more cost-effective approach.
Most benefits of a dynamic site stem from two fundamental characteristics: (1) the site’s content is stored in a database; and (2) the page is assembled on demand according to programmed instructions that can include conditional logic.
- Because the content is stored in a database, it can be easily searched, sorted, and referenced. Content is easily organized and browsed by category or topic.
- Content can be used and reused in a variety of locations and ways, eliminating redundancy. Want to put contact information at the bottom of each page? Store it in the database, then place it on any page you want. Change it in the database, and it will change wherever it exists on the site.
- The programming languages used to assemble dynamic web pages are quite powerful. They can vary a page’s content and layout according to the reader’s identity, the page’s name, even the time of day. They can pull content from other web sites, hide confidential information from the general public, and let readers know when the site has been updated.
- Users can add and change content without doing any programming, and with a much lower risk of introducing errors. The database can track changes to content and revert to earlier versions if errors are made.
Yet, with these added benefits, there can also be a loss of simplicity.
- Sites must be able to communicate with the database that stores all the content. The database must be maintained, backed up, and secured. If the database goes down, the site cannot display content.
- Because the content is not stored in a tangible page of HTML, it cannot be edited in a simple text editor or in Dreamweaver. Users need a way to edit the content stored inside the database.
- Dynamically created pages can take longer to load in a web browser. Instead of simply displaying the page you’ve requested, the web browser has to wait for the the page to be assembled from the database before it can be displayed. This process can be optimized, but it will rarely be as speedy as a static page. With today’s faster internet access, however, this can be less of a concern.
- Finally, someone has to write the set of instructions that communicate with the database, assemble the page, and display it in your web browser. Every interactive feature I’ve mentioned, from site search to user login, has to be written by programmers. And of course, this requires time and resources.
Content Management Systems
Many dynamic sites are coded from scratch. Large companies such as Amazon employ teams of computer programmers who write the instructions needed to create their web site’s pages for millions of viewers. However, many businesses cannot justify this kind of investment. Wouldn’t it be nice if you could buy software to take care of that for you?
Introducing: the Content Management System (CMS). A CMS is a software program designed to do exactly that. It gives the web developer a great head start by handling communication with the database, providing a set of building blocks for assembling the pages, and giving users the means to easily edit their content.
Content management systems can be written from scratch, purchased off the shelf, or obtained for free from open-source communities. They can be used as-is, or greatly customized to suit the specific needs of a site or client. Commonly used open-source CMS programs inlcude Drupal, Joomla, and WordPress. Each has its own relative strengths, and puts the benefits of a dynamic web site within the reach and budget of a small business owner.
When engineering a static site, the primary tasks are to (1) write each page; and (2) design and create the site’s appearance. These tasks can be done using a simple text editor, or with a program such as Dreamweaver, which writes much of the page for you. When developing a dynamic site using a CMS, the task list is more extensive:
- Install and configure the CMS and the database
- Write all the content items into the database
- Design and create the site’s appearance
- Customize and extend the CMS as needed, so that the pages contain exactly the content that is needed
While the CMS does much of the heavy lifting for the web developer, some level of programming skill is needed to customize the result. A program such as Dreamweaver is not as helpful in this arena.
When the site is completed, clients with no programming skills can easily edit the text content, add links and media files, add and delete pages, edit menus, etc. — all without incurring maintenance costs from a web developer. The CMS and the customizations made during development make this possible. The only changes that really require intervention from a developer are changes to the site’s appearance or the logic used to assemble and navigate the pages. This gives the users more independence, lowers the risk of editing errors, and greatly reduces their maintenance budget.
Some web hosting companies provide tools to help install and update many popular CMS programs and the databases they require. They offer regular database backups and tools for restoring the database in case of catastrophic error. These features are essential, not just for the developer’s convenience but for the security of a site’s content.