magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1999 > 10 > Webmaster's Domain

Developing Component-Based Pages with HTML::Mason

In recognition of this month's Open Source theme, the topic of this column is Open Source component systems for the Web, with emphasis on the full-featured HTML::Mason system for Apache.

What are Web components? Components are anything that can be mixed and matched to build larger Web pages. They can be static snippets of HTML, dynamic server-side programs such as CGI scripts, or dynamic client-side software such as JavaBeans.

Components actually have a long and distinguished history on the Web. The first component-based systems were server-side includes, introduced with the NCSA httpd server. With server-side includes, you can build full pages from bits and pieces of HTML boilerplate using specially formatted HTML comments. Before sending the document to the browser, the server scans for such comments and takes actions ranging from pasting in the contents of a file to inserting the contents of system variables.

For example, the bit of code shown in Example 1 inserts a standard disclaimer into the Web page by pasting in the contents of the file standard_disclaimer.html. Provided that every page on the site inserts the disclaimer using this server-side include statement, the disclaimer can be modified by changing just the single file, saving you from having to do a wholesale edit of every HTML file on the site.<>




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2