Re: A Compromise to the Versioning Debate

Versioning is essential as a developer shipping applications to customers.
Today I write HTML pages starting with the strongest assertion I can make:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

What this means in practice is that the page has been tested with IE6/7 and
Firefox, and found to work.  Does the page follow the HTML 4.01 standard?
Not in all cases.  In some cases both browsers omitted or added features
from the specification.  For the omissions I had to find alternatives.  To
get the job done, I have used features present in both browsers, but not
part of the standard.  I had to put in extra time to get page to work in
both browsers, as behaviors differ.

Once the page is written, tested, and the application shipped to the
customer, it is important that the browser implementations not change in any
way that could break the page.  Note that the DOCTYPE assertion does not
mean the page exactly follows the HTML 4.01 standard.  Strictly speaking,
the W3C HTML standard is a fantasy.  You cannot write pages for a fantasy,
you can only write pages for real, existing browser implementations.

Once the page is shipped to the customer, you must assume that from that
point forward it will not be possible to "fix" the page to adapt to future
browsers.  From that point forward, it is essential that the behavior of the
browser not change (at least for this page).

For the page to work in the future, what the DOCTYPE declaration must mean
is more than just HTML version.  The declaration must in effect capture the
current CSS and Javascript versions as well, and any future browser on
seeing that declaration must offer the same combined package of
HTML/CSS/Javascript must offer the same behavior as present browser
implementations.

Some folk argue for opting in to future changes to HTML with a declaration
like:

<!DOCTYPE HTML>

In effect this declaration asserts that the page will work in (then) current
and all future browser implementations.  This will not work.  It could work
if the specification, validation tests, and browser implementations were all
perfect.  No one is that perfect.  If any changes or additions to HTML are
made over time, there will be unexpected interactions.  There will be
unintended changes in behavior that break pages.  Since pages can only be
tested against existing implementations, pages will be based on behaviors
that are not intentional, or part of the standard.

We will make mistakes.  Hopefully we will learn from our mistakes, and over
time the scope of our mistakes diminish.  Validations tests (mainly
automated) are crucial if we want fast convergence.

Received on Sunday, 22 April 2007 08:40:12 UTC