-
Web Standards
Edward O'Connor
-
Happy Talk Like a Pirate Day!
-
What are web standards?
- First things first — what is the web?
The Web isn't a platform or a database or an API or… any other of those things. In fact, the Web isn't even a thing, it's a mesh of agreements with a nice straightforward engineering rulebook.
-
- Web standards just are the agreements that make up the mesh that is the web.
-
Broader definition than the norm
- arguably includes lower-level Internet standards like TCP/IP
-
Still, some things are clearly not standards
- behavior of some particular browser not an agreement
-
Standards organizations
- IETF — Internet Engineering Task Force
- W3C — World Wide Web Consortium
- Ecma International
- Unicode Consortium
- robotstxt.org (or rather, the robots mailing list)
- WHATWG — Web Hypertext Application Technology Working Group
- microformats.org
-
Standards in markup
-
Styling, scripting, and more
-
Styling
- CSS — the W3C's CSS WG
- XSL — W3C's XSL WG
- Scripting
-
Syndication — RSS and Atom
- As of February 2004, there were 9 different and incompatible versions of RSS and Atom 0.3.
- Atom 1.0 (RFC 4287) — IETF's atompub WG
-
Styling
-
Other web standards
- HTTP — IETF's HTTP WG & W3C's HTTP Activity
- URIs, URLs, etc. — IETF's URI WG & W3C's URI Activity
-
PNG — W3C's PNG WG
- W3C's first standard!
- robots.txt — robotstxt.org
- WebDAV — IETF's WebDAV WG
-
So much for what they are…
-
Why should we use web standards?
-
From Roger Johansson's
ten reasons to learn and use web standards:
- Make yourself look professional
- Make your clients look good
- Maximise the number of potential visitors
- Faster loading and reduced bandwidth usage
- Provide the foundation for accessibility
- Improve search engine rankings
- Make your markup easier to maintain
- Future-proof content
-
From Roger Johansson's
ten reasons to learn and use web standards:
-
How to use web standards
- Tons of great resources out there
-
Validation is only the beginning
- valid ≠ conforming
- valid ≠ accessible
- valid ≠ usable
- "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo" is a valid English sentence, yet…
-
Using web standards together
-
Separation of concerns:
use each standard for its specific purpose
-
(X)HTML for structure
-
(X)HTML has many elements with semantic import, e.g., use
<hN>…</hN>
instead of<div class="header">…</div>
-
(X)HTML has many elements with semantic import, e.g., use
-
CSS for presentation
-
N.B.
@class
is structural, not presentational
-
N.B.
- DOM scripting for behavior
-
(X)HTML for structure
-
Fully exploit each standard before hacking around shortcomings
- e.g., XHTML compounds before microformats
-
<ol class="chat-log"> <li><cite>Patrick</cite>: <q>Dude, I've got to go back East; can you cover for me at Refresh?</q></li> <li><cite>Ted</cite>: <q>Sure!</q></li> </ol>
-
Separation of concerns:
use each standard for its specific purpose
-
How not to use web standards
-
spirit v. letter
-
e.g.
div
itis — look ma, no tables (and no semantics)!
-
e.g.
- Following standards in a world that doesn't
-
spirit v. letter
-
How to help make web standards
-
Know the organizations
- Each org has own rules, IP policies, procedures, members, agendas…
-
Example: how is membership determined?
- W3C, Ecma, and Unicode Consortium have only corporate members (and Invited Experts)
- IETF has only individual members
- WHATWG membership is by invitation only (but non-member contributors welcome)
-
Example: incremental change v. radical change
- XHTML 2 (W3C) is a major departure from previous versions of (X)HTML
- (X)HTML 5 (WHATWG) is an incremental (but substantial) update to HTML 4 and XHTML 1.0
-
Know the organizations
-
Discussion
- How to use / how not to use web standards
- When to use / when not to use web standards
- Best practices
- Refactoring legacy code to use web standards
- Design issues in using web standards
- Typography
-
How are
sausagesweb standards made- procedural differences between standards bodies
- controversy, forking, and divisiveness
- genesis of WHATWG, microformats.org
-
In the trenches: adopting web standards at work
- How to sell bosses, clients, designers, and developers on it
-
C'est ça!