Principles and Standards

Development Principles

General Principles

These are the general principles governing Website development projects in HCMC:

  1. As far as possible, re-use code and write new code that lends itself to reuse and ease of maintenance.
  2. Separation of concerns (structure/content, style, executable). Content should be easily editable by non-technical staff using text editors, and complex code should be in separate files (CSS, JS, and include files).
  3. 100% support for current W3C standards.
  4. No reliance on proprietary plug-ins, special configurations etc.
  5. No gratuitous graphics; in particular, no use of graphics to represent text, or to create features such as rollovers.
  6. Write code to W3C standards and expect browsers to support them rather than optimizing for any specific browser or platform. Good coding habits result in pages that will be readable in old browsers; they just won't look pretty.
  7. Make every effort to ensure that code complies with the guidelines of the W3C Web Accessibility Initiative. Again, sound coding practice takes us much of the way towards this goal.
  8. Developers are expected to work with programmer's tools. For example, a text editor with syntax highlighting is acceptable, but WYSIWYG editors in DreamWeaver or FrontPage are not. It is part of our mandate to train our assistants and workstudy students in technical skills.

Technical Standards

Standards for Web Pages

All Web documents and files produced by HCMC must conform to the following standards:

Structure and Content

All pages must be written in XHTML 1.1, barring exceptional circumstances. A good tutorial on XHTML is available at

Pages must have the following opening tags:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<html xmlns="" xml:lang="en">

All pages must be validated using the W3C's validator at, using automatic detection of character encoding and document type. The validator's approval graphic should be displayed somewhere on the site.

Page Layout, Text Styling Etc.

All text styling, positioning and page layout should be accomplished with Cascading Style Sheets (CSS). A good tutorial on CSS is available at

The CSS should be centralized in a separate CSS file and linked from each page. As much as possible, the CSS selectors used should be plain XHTML tags; proprietary classes should be used only where necessary, and if possible, limited to areas of pages likely to be edited only by technical staff.

CSS files must be validated using the W3C's validator at (CSS version 2 or above), and the validator's approval graphic should be displayed somewhere on the site.

Client-side script

All client-side scripting should be in JavaScript/ECMAScript, and wherever possible should be stored in separate JS files. All JavaScript should be clearly commented, and should adhere to a regular coding standard -- for instance, if camelback notation is used, it should be used everywhere.

If XHTML standards are fully adhered to, and all styles are centralized in stylesheets, then even old browsers should display the text in a readable manner. This can be tested by renaming the stylesheet temporarily, to see the site displayed without styles.

Server-side processing

PHP is provided on the university's web server, use it to include elements repeated on numerous pages and to generate standards-compliant xhtml from the results of a query to a database.

MySQL is provided by the university as a back-end database for projects requiring such resources.