web-with-molly

Event Recap: Web with Molly

I recently attended the excellent Web with Molly workshop held in Tucson, Arizona (February 2012).

The overall topic was the Open Web. Understanding its history, key technologies, and important concepts. Molly presented over two full days, with interludes and additions by special guest Kimberly Blessing (who also took photos).

Even considering myself an industry veteran—I’ve worked full-time on the web for over seven years, I learned new things and solidified several of my weak areas. I highly recommend this workshop to anyone who works on the web. And, Molly organized the weekend on her on time—and her own dime. Thanks Mols!

Here are my notes from the sessions.

Open Web

Preserving the infrastructure of the web so it remains open to everyone.

What is the Open Web?

1. Dedication to open standards
2. Use of technology should be unobtrusive
3. Recognition of the web as an application and document platform
4. Encourage open, organic groups such as WHAT-WG and microformats.org

Groups like these extend what is coming from W3C to begin implementing things faster, and start using technology now.

Making research and development part of your process—part of your team workflow—keeps a conversation open. We are serving a much larger future.

Core principles

Transparency and authenticity
From a browser vendor’s viewpoint this means allowing dev previews, blogging about changes. IE (Internet Explorer) is doing a great job with this.
Connectability via APIs
JavaScript (JS) is the most-used programming language on the planet. You get a JS compiler, interpreter on almost all devices.
Open specifications
These things need to go through the patent exclusion process.
Error forgiveness
Allow people to make mistakes.

Additional thoughts to go with core principles.

Freedom of Social Forms—an idea coined by Brad Neuberg from Google. Look at things beyond what they are or are not.

The [Open Web] is big enough to support many forms of social and economic organization, including ones we haven’t imagined yet.

The Many Things Rule—an approach to a problem with a broader perspective. Something you make can be used by other people and for other applications.

User experience (UX) and front-end development are key skills for working with the Open Web.

Core technologies

- HTML5
– CSS3
– JavaScript

Also discussing:

- video and audio
– Visual technologies: canvas and SVG

Under the JavaScript umbrella are things like XmlHttpRequest (XHR), what we now know as “Ajax” (note the spelling). Originally conceived by Microsoft to allow Outlook for the web.

HTML

History lesson first. WHATWG first came out as a grassroots movement, with Ian Hickson (was at Opera, now at Google). It was the first time that all major browser makers agreed on a single spec: HTML5. The working group had 800 invited experts!

Recently, Ian’s announced it’s no longer known as “5”, saying it’s a living standard. It’s more mature than any version of HTML, and no longer a draft.

He stirred the pot, recently, with the (now reversed) decision to remove the time element in favor of data. Molly mentioned all the jokes that sprung up around this. One web dev says to another, “Say, do you have have the “? One guy, scarily, making changes and everyone is letting him.

Molly defines HTML5 like this:

HTML5 is a vocabulary and set of application programming interfaces that make up a core declarative language for web sites and web applications.

Pop quiz! What is the only required element for a valid HTML document? title element. Because HTML is based on SGML, the rest was added later to be declarative and provide structure for layout.

HTML5 design principles

1. Support existing content
2. Ensure interoperability
3. Define user agent (UA) behavior instead of leaving it open for implementors to interpret for themselves. Best practices come from real world usage.
4. Better error handling
5. Evolve, not re-create

A fun mollyquote:

The Open Web is threatened by the three As: anarchists, Apple, and asshats.

application/xml MIME type was not supported by any version of IE, until the most recent version—after XHTML was already declared dead. Oh, the irony.

Avoid XHTML5 (which is just plain stupid). What it should be called is XML+HTML. It’s used mostly for internal projects by people who want facilities that come with HTML5 but need to serve XML.

HTML5 Media APIs: goal is to replace plugins with native solutions: video, audio.

Molly here discussed the H.264 codec war. It is not an open or web standard, it carries a $5 million/year cost. Alternatives include OGG (considered unencumbered, “probably, probably never going to get sued for rights”).

Another mollyquote:

At Opera we called it H.666 :)

[Lance side note: Molly mentioned OGG being developed by Thomas Dolby. I didn't see any mention of his name at http://en.wikipedia.org/wiki/Ogg.]

Video progressive enhancement means using the video element with H.264, OGG, WebM, and Flash as the last fallback.

canvas

It’s bitmap (not vector), great for 2d animations and games. You design with JavaScript. Immediate mode versus retained mode, meaning instant gratification. Used and abused for text-shadow and special details that are totally irrational. Not built as a web element (came out of Apple)

SVG

Far more accessible, vector-based. Good for interaction, shapes. Allows access to the DOM. Google indexes it.

Other technologies related to HTML5

Device-related APIs, Wholesale Applications Community (WAC). It’s like the open web for mobile.

HTML outlines

[An interlude by Kimberly.]

In HTML5 each of the sectioning elements starts a new tree. section, article, aside, nav. You can start again with an h1 as the top-level heading inside of each sectioning element.

Understanding divisions versus sections. section is *not* a replacement for div. div still has meaning (which is “null”). It’s a division. section is different because it changes the document outline, div does not.

(More info)

CSS

Molly says this is a “polyfill class”—filling in the gaps in our understanding, making sure we know the correct terms and definitions. Using the terminology is super important, a team should use a shared terminology.

History lesson: 1994 saw the beginnings of CSS, based on print technology. Hakom Lie and Burt Vos came to the W3C, they were document specialists and from the print world.

CSS rule structure

selector {
	propery: value;
}

The code within the braces is the declaration block, property value pairs are declarations. In CSS, rules are the basic building block

Important note: inheritance != cascade. [Lance note: I am often confused on this point.]

Inheritance is the document tree: ancestors/parents/children. Any property that is inheritable will be applied down the tree until another rule overrides it farther down the tree.

Cascade answers the question, “What is the origin of the style?”

  1. Browser (user agent)
  2. User
  3. Author
    1. Inline
    2. Embedded
      1. Imported
    3. Linked (external)

Quick !important story. It used to be the other way around in CSS1, user styles came last in the cascade.

Reset method puts the author in control, makes the user agent styles a level playing ground. Linked stylesheets: leaving the media attribute out, it defaults to “all.”

Sort order within the cascade: inline, embedded, author. User styles override browser (but not author!). Rule: closest to the content overdrives other rules (after specificity is calculated). But !important in user trumps !important in author.

[Lance joke interlude: is the best way to classify a raunchingly humorous site.]

pseudo classes are things like a:hover and a:focus.

The “combinator” is the selector symbol used to denote the relationship between the selectors.

- [space] descendant
[>] child (only down one level)
[+] adjacent sibling
[~] general sibling

Complex examples can be solved by the “nth child” selector, like table striping. Adjacent sibling combinators are great for “when these two occur together” and make them appear differently.

[Interlude: clearing floats with overflow]

Kimberly says you don’t need a width on the parent element. If you have overflow: hidden; you can sometimes get a scrollbar when you see an outline on the element; to get around it add padding-bottom: 1px;.

Overflow to clear floats is not a hack, it’s right from the spec.

[Back to CSS.]

Pseudo-elements like :first-line, see also generated content with :before and :after. Nice use would be an href display for print CSS, to show the full URL on the printed page.

We should all learn about how browsers work: re-render, re-paint, re-flow.

Positioning

- relative is “offset”—it’s calculated relative to itself, in the normal flow, the content does not move up to take its place in the flow.
absolute is taken out of the flow, now placed according to the nearest positioned ancestor (the ancestor does not need any offset, just a position propery), or the root element in the tree (HTML element).
fixed is out of the normal flow, placed according to the viewport. This was not supported in IE6.

Coming soon to CSS:

- The flexible box model
– Multiple columns
– Template-based layout
– Grid positioning, “snap to” idea of placing elements

See Jina Bolton’s work with template-based layouts.

Random notes from the workshop

“Web project manager” needs to be a named and defined role; it’s the missing piece in web production teams … aka Tech Lead.

We’re in the era of dev ops, everyone needs to know the full stack.

Important note: jQuery != JavaScript

The best interface for web APIs is HTTP + HTML. Send a web page, let the receiving service parse it.

What is ontology? A vocabulary. Molly mentioned OWL; XML languages for each industry, “Web Ontology Language”. (Wikipedia)

Photos

Kimberly took a few photos at the workshop: Web with Molly on Flickr. Including the featured photo shown for this post—thanks Kimberly, for being a part of the workshop.

Published by

Lance Willett

By day Lance is a web developer at Automattic, and by night he is Launcelot du Lac, Knight of the Round Table.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s