Principles and Standards
These are the general principles governing Website development projects in HCMC:
- As far as possible, re-use code and write new code that lends itself to reuse and ease of maintenance.
- 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).
- 100% support for current W3C standards.
- No reliance on proprietary plug-ins, special configurations etc.
- No gratuitous graphics; in particular, no use of graphics to represent text, or to create features such as rollovers.
- 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.
- 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.
- 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.
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 http://www.w3schools.com/xhtml/default.asp.
Pages must have the following opening tags:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
All pages must be validated using the W3C's validator at http://validator.w3.org/, 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 http://www.w3schools.com/css/default.asp.
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 http://jigsaw.w3.org/css-validator/ (CSS version 2 or above), and the validator's approval graphic should be displayed somewhere on the site.
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.
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.