Offline Programmatic Generation of Web Pages
Stephen B. Jenkins
About the Author
About the Paper
Three Ways to Provide Web Content
- Static HTML pages
- Dynamic CGI programs
- Or a compromise between the two above:
Offline Programmatic Generation (OPG) of web pages
What is OPG?
- Using programs to generate web pages at time and place of your choosing
- Run programs manually or via
cron
When to use OPG
- When your data changes rarely
- When your ISP doesn't allow CGI programs
- When you (or your boss/client) are paranoid about security
- When your web pages are:
- large
- slow to generate
- complex to modify
Data Sources
<DATA> segments
- Text files
- Server log files
- CSV/Spreadsheet files
Four Examples of OPG
- Music studio schedule
- Hockey league statistics
- Log file summary
- Conference web site
Music Studio Schedule
- Public web page showing available time slots
- Private web page showing student info, etc.
- Information in a
<DATA> segment
Ex. 1 - Studio Schedule - Code
Ex. 1 - Studio Schedule - Data
Ex. 1 - Schedule - Public Page
Ex. 1 - Schedule - Private Page
Hockey League Statistics
- Calculate and show statistics for players and goalies
- Data in a text file
Ex. 2 - Hockey Stats - Data File
Ex. 2 - Hockey Stats - Players
Ex. 2 - Hockey Stats - Goalies
Log File Summary
- Large eventlog files
- Formatted like Apache logs
- Summarise event numbers over previous day, week, month, quarter, and year
- Article about this application will appear in Dr. Dobb's Journal, Nov., 2005
Ex. 3 - Event System - Log File
Ex. 3 - Event System - Daily Sumary
Ex. 3 - Event System - Index
Conference Web Site
- Presentation list
- Author list
- Conference program
- Data in an Excel file
Ex. 4 - Conference Web Site - Excel Data
Ex. 4 - Conference Presentation List
Ex. 4 - Conference Author List
Ex. 4 - Conference Program - Monday
Wrap Up
- Laziness
- get others to do the grunt work of maintaining web sites
- if there are no others, get
cron to do it
- Impatience
- they can do it whenever they want
- no need to bug me, or wait for me
- Hubris
- gives a consistent, professional look