stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Static content generation







Static content generation

Static content generation 12/12/2003 08:57 PM

Ian Bicking has an interesting pieces on using static publishing in a CMS. The choice between static and dynamic when building software for the web is a critical one, and one that I think deserves in-depth discussion.

In a dynamic site, pages are assembled "on the fly" as and when they are requested. Most PHP powered sites do this and as PHP as a technology actively encourages dynamic content creation. Generating pages dynamically allows for all sorts of clever applications, from random quote generators to full on web applications such as Hotmail.

In a static publishing system, HTML pages are pre-generated by the publishing software and stored as flat files on the web server, ready to be served. This approach is less flexible than dynamic generation in many ways and is often ignored as an option as a result, but in fact the vast majority of content sites consist of primarily static pages and could be powered by static content generation without any loss of functionality to the end user.

The most widespread example of a static publishing system I've seen is Moveable Type, which rebuilds static files for a site each time a weblog entry is added or modified - although it can be configured to serve content dynamically instead.

At first glance, the benefits of dynamic publishing are obvious. What is frequently ignored are the benefits of static publishing, at least for content-driven sites which don't have any heavy need for dynamic features. The most obvious benefit is performance; serving static files is what web servers such as Apache are optimised to do, and they can do it fast. A second advantage is reliability, as Ian explains:

A big part is that it takes the pressure off of going live. I can be sure before going live that the public website is correct. The actual CMS may explode in flames, but the site will be fine. Going live with a web application is always a stressful process, and anything that reduces the stress of that is a great benefit. As time goes on, static publishing is also a big stress reduction for the system administrator, since a simple Apache configuration is a lot more reliable under different loads and configurations than any dynamic site will be.

I've been developing dynamic sites almost exclusively for the past two or three years, but a couple of my most recent projects were static rather than dynamic. These were the LJWorld.com Coupons site and the KUSports.com photo galleries. I wanted to write both of these in Python, because doing so would make the process of transferring them over to our new mod_python powered CMS (currently in development) far less involved. Unfortunately our main production servers don't currently have mod_python configured, and we weren't overly keen on setting it up there for the sake of a couple of small projects. Instead I decided to write the administration interfaces using Python CGI scripts, but generate the actual front end pages (which would see far heavier traffic) as static files.

In addition to the performance and reliability benefits, an additional benefit is that static generation provides a simple "staging area" style feature for free. Both the coupons and the gallery interfaces allow users to make multiple changes to site content safe in the knowledge that none of the changes will become visible until the "Publish Site" button is selected. At first I was worried that this extra step could prove confusing, but in practise it allows our content producers to make changes in a safe environment, without fear of accidentally breaking the public site while they are working.

Static content generation certainly isn't appropriate for every project, but for plain content sites sites that don't need dynamic features it's a much more viable option than many people think.




This is a GrokNews Entry: (what is grok?)





Similar Items

Static content generation

Grok Headline matches for Static content generation

Static HTML Generation With PHP


Static HTML Generation With PHP 11/27/2002 09:47 PM
Want to reduce the load that MySQL has on your web server? Generating Static HTML pages to replace queries is the solution. Learn how.

Emc Launches Next-generation Enterprise
Content Management Platform


Emc Launches Next-generation Enterprise
Content Management Platform
03/24/2005 01:48 PM
ZDNet India Mar 24 2005 5:15PM GMT

Dwango Establishes Next-Generation
Mobile Phone Content Development Company


Dwango Establishes Next-Generation
Mobile Phone Content Development Company
02/18/2004 02:18 AM
Japan Corp Feb 18 2004 6:55AM GMT

Tiger Telematics and NVIDIA Collaborate
on Next Generation Mobile Gaming
Technologies and Content


Tiger Telematics and NVIDIA Collaborate
on Next Generation Mobile Gaming
Technologies and Content
09/21/2004 12:14 PM
Belga Direct Press Releases Sep 21 2004 3:15PM GMT

Sprint Certifies Apple Xserve G5,
QuickTime to Help Content Providers
Deliver Next Generation Mobile Video
Services


Sprint Certifies Apple Xserve G5,
QuickTime to Help Content Providers
Deliver Next Generation Mobile Video
Services
08/27/2004 01:33 PM

Tie-Static-0.04


Tie-Static-0.04 04/10/2005 03:49 AM

Still a lot of static


Still a lot of static 02/17/2004 06:32 PM
CNN Feb 17 2004 11:18PM GMT

Still getting static


Still getting static 07/06/2004 01:54 AM
USA Today Jul 6 2004 6:07AM GMT

Hot Banana Wins 2005 e-Content Award -
Best Content Management System - CMS


Hot Banana Wins 2005 e-Content Award -
Best Content Management System - CMS
04/08/2005 04:55 AM
Hot Banana Software Inc., a leading North American Web Content Management Suite (CMS) company, announced today that it has won the 2005 e-Content award for the best Content Management System. The Canadian e-Content Awards are sponsored by the e-Content Institute and were created to recognize and honor e-content products and services used by Canadian organizations and individuals. [PRWEB Apr 8, 2005]

Static over RFID


Static over RFID 09/13/2004 06:55 AM
A key patent holder wants royalties. If that starts a trend, adoption of radio frequency identification technology could suffer.

Anti-Static Pen


Anti-Static Pen 03/22/2005 04:46 PM

static_pen.jpg imageThose of us who dabble inside of their PCs have surely, at one time, concerned themselves with static electricity. Sure you can take some precautions like getting one of those retarded looking wrist things or touching some metal object. But why would you want to do that when you can now spend $29 on a "Static Zapper Pen?" When I first read the product name, I thought the pen could actually zap people (like a pen tazer), but I shed a tear to learn that it is for preventing static shocks.

Product Page [CompactImpact via TRFJ]


Dynamic vs Static


Dynamic vs Static 11/20/2002 12:42 PM
Phil Ringnalda proposes a "Half-baked, and a little fried" hybrid dynamic/static weblog system: While browsing through Rasmus's Tips and Tricks...

Static Calendar


Static Calendar 12/22/2004 01:57 AM
Static Calendar Proposal as seen on Slashdot This is something I found on Slashdot and thougt was interesting. Judging by the savvy website of the new calendar's creator, I doubt we'll be having "Newton" months anytime soon. Check it out.

Now with static FTP rendering!


Now with static FTP rendering! 06/15/2004 07:57 PM

I just got an email pitching the new Manila server. Talk about your bad timing.


No static. Democratic.


No static. Democratic. 12/30/2004 08:00 PM
Channel 101 - Democratic "television" on the web. Shows include The 'Bu (first episode in 3-D!!!), the bizarre Ringwald and Molly, Laser Fart, the much downloaded Kicked in the Nuts!, and many more. Some shows may be NSFW.

Rhythmic static


Rhythmic static 06/17/2005 04:25 PM
I've occasionally noticed static playing over speakers in roughly the same rhythm: a quarter note and three triplets. Deeeeet dit-dit-dit dit-dit-dit dit-dit-dit. At first I thought it was something wrong with my PC speakers or sound card. But I've also heard it over the headphones while waiting to go live at a professional radio station. And I heard it over the speakers in the back of a London cab yesterday. Deeeeet dit-dit-dit dit-dit-dit dit-dit-dit. Deeeeet dit-dit-dit dit-dit-dit dit-dit-dit. Is this some predictable electrical noise, like a 60-cycle hum? Or is it a coded message from our equipment?...

PHP Static Class Variables


PHP Static Class Variables 12/02/2002 01:17 PM
Static class variables are variables that are shared among all instances of a particular class. Although PHP supports static variables in functions, it has no support for static variables in classes. This functionality can be pretty important in some situations, and I will now describe a way to simulate it.

Britain: Static for a Statin


Britain: Static for a Statin 06/22/2004 05:09 PM
Business Week Jun 22 2004 9:30PM GMT

Catalyst-Plugin-Static-0.05


Catalyst-Plugin-Static-0.05 03/23/2005 02:46 AM

cwmtx 0.5.0 (Static-dim branch)


cwmtx 0.5.0 (Static-dim branch) 04/05/2005 05:35 PM
CwMtx is a library written in C++ that provides the matrix and vector operations that are used extensively in engineering and science problems. A special feature of this library is the quaternion class which implements quaternion math. Quaternions are very useful for attitude determination in 3D space because they do not suffer from singularities. Furthermore, successive rotations and transformations of vectors can be accomplished by simple quaternion multiplication. Attitude dynamics can be expressed in a very compact form using quaternions
Changes:
A quaternion series smoothing example demonstrating how to use the cwmtx quaternion class properly has been added. New functions have been added: sgn(qtn), arg(qtn), exp(qtn), log(qtn), and pow(qtn1, qtn2).

Catalyst-Plugin-Static-0.03


Catalyst-Plugin-Static-0.03 03/17/2005 03:19 AM

Static Discrete Surfaces


Static Discrete Surfaces 01/02/2004 06:15 PM
Version 0.1

Catalyst-Plugin-Static-0.06


Catalyst-Plugin-Static-0.06 04/15/2005 01:07 PM

OAI-PMH Static Repository Gateway


OAI-PMH Static Repository Gateway 07/12/2004 02:04 PM
Minor bugs fixed on CVS version

Catalyst-Plugin-Static-0.07


Catalyst-Plugin-Static-0.07 04/17/2005 10:59 AM

HTTP-Server-Simple-Static-0.02


HTTP-Server-Simple-Static-0.02 03/30/2005 06:43 AM

Cable Debate Generates Static


Cable Debate Generates Static 07/15/2004 04:58 AM
A House subcommittee hears what's good and bad about roll-your-own cable, but little is expected to happen until the FCC weighs in. Michael Grebb reports from Washington.

Converting Windows NT 4.0 Static IP to
DHCP


Converting Windows NT 4.0 Static IP to
DHCP
09/07/2004 01:16 AM

Pure Static Web Hosting Launched


Pure Static Web Hosting Launched 01/05/2005 04:44 PM
theWHIR Jan 5 2005 8:11PM GMT

FAQ | Installing hardware, avoiding
static


FAQ | Installing hardware, avoiding
static
02/15/2004 07:05 AM
Philadelphia Inquirer Feb 15 2004 10:43AM GMT

Introduction to Static and Dynamic
Typing


Introduction to Static and Dynamic
Typing
06/17/2004 11:59 PM
WebmasterBase Jun 18 2004 4:37AM GMT

Web Log Analysis Evolves Beyond Static
Reports


Web Log Analysis Evolves Beyond Static
Reports
08/31/2004 02:11 AM
In addition to creating the standard reports that you'd expect to see in a professional web log analysis program, Web Log Storming provides interactive reports and charts. The program's main strength is its on-the-fly filtering, allowing you to zero in and study particular behavior. [PRWEB Aug 31, 2004]

Notes and Tips: XM Radio Static


Notes and Tips: XM Radio Static 04/14/2005 10:22 AM
XM Radio's Mac support is drowning in static....

Wireless photos, video hit some static


Wireless photos, video hit some static 05/11/2004 02:55 PM
New U.S. guidelines meant to free up wireless e-mails with attached photos and videos are getting a mixed reception from carriers.

The Difference Between Online Content
And Broadcast Content


The Difference Between Online Content
And Broadcast Content
02/10/2004 02:46 PM
Major League Baseball made news last year for claim ing to own all in-progress game data - saying they were going to go after websites that reported what was happening at a game in real-time. It didn't matter that the law is pretty clear that you can't copyright facts - MLB believes that just presenting the data is a "rebroadcast" of the game. That said, I guess it's no surprise to hear that they now believe that web audio and video broadcasts of games should work the same way as television broadcasts with a content provider paying a huge upfront fee for the rights to the games, and then telling them they can make it back in ad revenue and subscription fees. Of course, the various internet sites they've approached with this plan have been laughing them out the door, and pointing out that they're not television stations, and they just want to provide something useful to their users - but aren't going to lose money to do so. While MLB has been at the forefront of offering streaming video and audio, it appears they still look on this as a broadcast medium, and not the interactive medium it actually is. They're doing their best to squeeze more money out of existing fans, rather than attract new fans, which is dangerous for the future of the sport. Not only do you anger your biggest fans, you also make it less likely that you're going to pick up new fans.

Usenet Content Up For Grabs On Content
Hungry Web


Usenet Content Up For Grabs On Content
Hungry Web
12/19/2004 03:08 PM
The age old question of copyright and Usenet comes up again.

Adding Optional Static Typing to Python


Adding Optional Static Typing to Python 12/24/2004 01:09 PM
Adding Optional Static Typing to Python .. written an article

artima.com/weblogs/viewpost.jsp?thread=85551
track this site | 3 links


"Adding Optional Static Typing to
Python"


"Adding Optional Static Typing to
Python"
12/25/2004 05:03 PM

Apple investigating complaints of iPod
static


Apple investigating complaints of iPod
static
04/12/2004 10:02 PM
Apple Computer says it is looking into some users' complaints of sound problems--ranging from crackling sound to interrupted play--with the iPod Mini.
Grok Description matches for Static content generation
GrokA matches for Static content generation

Static content generation

The following phrases have been identified by the grok system as matching this entry:

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

New Python Computer
Science text book

Grouping table data
by header

Cowpland hit with
2-year ban, payment
to OSC

Adobe beats earnings
expectations

Google office
Internet summit
makes call to 'wire
up' the world

Hand-held computers
to draw up power
bills

Google to set up R&D
arm in Bangalore

Intel bullish on
India

Valley job picture
brightens slightly

Microsoft shares IT
expertise

Market leaders,
costs, cost savings
and BPO offerings
are identified

Halo: Combat Evolved
Apple iPod In Short
Supply For Christmas

All I need now is
some Super-Sugar
Bomb Cereal!

CSS Caching Issue
JoePaint
orgOnline
Open Java Direct
Connect

Online Games Having
Trouble With The
Whole Free Speech
Concept

Apple releases Pro
App Runtime update

Delaware Senator
Proposes Internet
Sales Tax

Creating a Privacy
Policy Compliant
with the New Online
Privacy Protection
Act

DTV and eGovernment
Lucent gets final OK
of settlement
announced in March

The Economic and
Social Research
Council (ESRC)

BioTech Future
Useful Applescripts
for coding PHP in
BBEdit

Gadu-Gadu relay
agent 1.0-pre2

socketlock 0.1
High-Tech Texan:
Google Deskbar

Second Autopsy
Results Could Differ
From First In Jones
Case

Find Latest News at
News Channels:

Thoughts from SES
AOL Testing
Low-Priced Dial-Up
Access

Letters, we get
Letters

Google coming to
Bangalore

Google Eyes India
R&D Facility for
2004

Search Engine
Considerations for
Entrepreneurs:
Things You May ...

Annotis Mail v2.0
Build 109

2003 Gift Ideas For
The Macintosh-Minded

2003 Gaming Gift
Ideas

2003 Software Gift
Ideas

2003 Hardware Gift
Ideas

Microsoft removes
swastikas from
software fonts

Canadian drug
company CEOs doubt
Internet pharmacies
can meet U.S. demand

Microsoft workers to
get $382 million
from stock options

White House: No
Conflict for Baker
in Iraq Role

Scott Peterson Wants
Calif. Trial Venue
Changed

Weekend Movies:
Mixing Oscar Talk
with Absurd Comedy

what is grok?