best practice Archives - Broken Links Archive

Best Practice for Creating Custom Elements

It looks like cus­tom ele­ments, and web com­po­nents in gen­er­al, are begin­ning to break through into gen­er­al devel­op­er con­scious­ness, as I see more and more arti­cles and talks dis­cussing what they are, what they are good for, and how to make them.

As they’re not yet being used heav­i­ly in devel­op­ment, how­ev­er, I think there’s a good oppor­tu­ni­ty to define best prac­tices in the way we use them. In this post I want to pro­pose a best prac­tice method for writ­ing cus­tom ele­ments: I’ll do that by com­par­ing two meth­ods for cre­at­ing cus­tom ele­ments, along with the advan­tages and draw­backs of each.

Aside: it strikes me that I haven’t writ­ten about cus­tom ele­ments here on my own blog, despite hav­ing giv­en a few talks and writ­ten a few pub­lished arti­cles on the sub­ject. In case you’re not sure what they are, I rec­om­mend you read my Detailed Intro­duc­tion To Cus­tom Ele­ments first.

Read the full article

Bad advice: people still teaching CSS hacks

There’s so much great stuff writ­ten about web stan­dards avail­able for free on the web that it’s easy to for­get how much bad stuff is also out there; and how many peo­ple are will­ing to sup­port it just because it’s eas­i­er than putting in a lit­tle extra effort to fol­low best practice.

Over the week­end one of the most pop­u­lar sto­ries on was teach­ing the use of lazy CSS hacks, the type of which I thought every­body was con­vinced enough to do away with; the star and under­score hacks for tar­get­ing IE6 & IE7, the hacks which we’ve been say­ing (for years) should­n’t be used anymore.

Dis­re­gard­ing the ‘rights’ and ‘wrongs’, and the val­i­da­tion argu­ment — some of my stylesheets don’t val­i­date, and there are good rea­sons for that — I’d like to give a few oth­er rea­sons why using this method is not a good idea.

Read the full article

A website unfit for a queen

To great fan­fare, The Queen, in the com­pa­ny of Sir Tim Bern­ers-Lee, unveiled the new British Monar­chy web­site today. Unfor­tu­nate­ly, what they unveiled was a real dog’s dinner. high­lights the worst ele­ments of the prac­tice of web devel­op­ment; on only the sec­ond page I vis­it­ed it became obvi­ous that the site has­n’t been test­ed on any brows­er oth­er than Inter­net Explor­er, and a peek at the source code left me shocked.

Read the full article

Web standards and the environment

A cal­en­dar­i­al mishap left me think­ing that Blog Action Day was on the 18th Octo­ber when in fact it is, of course, today. It’s 23.00 here as I write this, so I have one hour to write a post and offi­cial­ly get away with it.

So the title of the post is “web stan­dards and the envi­ron­ment”, which at first seems pret­ty incon­gru­ous. To be hon­est, at sec­ond and third it still seems pret­ty incon­gru­ous. But I want to make the case that con­cern­ing your­self with the envi­ron­ment is like con­cern­ing your­self with web standards.

Read the full article


I’ve updat­ed my Speak­ing page to include more con­fer­ences, more videos, and a lit­tle on my speak­ing require­ments and pref­er­ences. I’m plan­ning to cut down on the num­ber of talks I give in 2014 (twelve is too many), but am always open to inter­est­ing offers and oppor­tu­ni­ties, so please get in touch if you’re organ­is­ing an event.

[#] 1 Comment . More Asides.