Of all the various ways you can make your site, your pages
will more or less fall into one of two categories; dynamic or
static. While the differences may seem obvious at first, the
distinction becomes rather blurred at the edges when you try
to categorize your work into one of the two types. Indeed, you
might not feel the need to know the nature of the pages you
are building, but more often than not your type of page could
have an effect on the type of software that is best for the
job.So what's the difference?
Essentially, static pages are those on your site that send
exactly the same response to every request; dynamic pages can
customize the response on the server to offer personalization
based on cookies and information it can get from the visitor.
An obvious example of a static page is an old style HTML
document; the only way to change a HTML page is to upload a
new or updated version in its place. Every time a static file
is downloaded, the file contents that are sent to the browser
are the same for everyone that accesses that file.
While most pages written in a particular scripting language
will return a personalized response to each visitor, this is
not always the case; the same is true for pages utilizing
Server Side Includes. Suppose for a moment that you had two
SHTML documents, both of which include a single file; the
first including a simple HTML snippet for the menu, the second
including an online poll script. The page including the menu
would be static; the menu would be the same for everyone that
downloaded it until either of the files were changed on the
server. The page that included the poll however would be
dynamic, as it would display different pages to people
depending on their previous voting history.
Flash and Shockwave presentations are also classed as
static content; despite the fact that user interaction can
lead to different ways of presenting the same data, everyone
will download the same file from the server.
Static Pages
Most of these advantages and disadvantages apply to normal
HTML pages in particular.
- Advantages
-
- Quick and easy to put together, even by someone who
doesn't have much experience.
- Ideal for demonstrating how a site will look.
- Cache friendly, one copy can be shown to many people.
- Disadvantages
-
- Difficult to maintain when a site gets large.
- Difficult to keep consistent and up to date.
- Offers little visitor personalization (all would have
to be client side).
Dynamic Pages
Typically written in various scripting languages or
technologies such as ASP, PHP, Perl or JSP.
- Advantages
-
- Offers highly personalized and customised visitor
options.
- Database access improves the personalized experience
(as opposed to using just client side cookies)
- Scripts can read in data sources and display it
differently depending on how it is run.
- Can create the illusion of being updated regularly
using time and date sensitive routines (or even
randomisers) to display pre-written text.
- Disadvantages
-
- Personalized pages are not very cache friendly.
- Requires a basic minimum knowledge of the language
being used.
- Scripts need more consideration when uploading and
installing, particularly to *nix servers.
How does the page type affect the way I work?
I've found that webmasters can also be split into two main
categories; the coders and the designers. In
general, coders will prefer to build dynamic pages, while the
designers prefer to produce the more fancy static pages.
That's not to say that the coders don't design or the
designers don't code; just that they tend to concentrate on
what they know best.
From my observations I have made in various debates about
which editor is the best, the coders usually opt for a
text-based editor such as TextPad or BBEdit, while the
designers prefer WYSIWYG (What You See Is What You Get)
editors such as FrontPage or Dreamweaver. Each approach has
its benefits and drawbacks, the details of which are best left
to another discussion; but by either design or default,
dynamic pages are usually built using a text based editor
while static pages are often built with the WYSIWYGs
|