Archive for the 'Scripting' Category

WebDD: February 3 2007

Monday, January 22nd, 2007

WebDD is a web design and development conference to be held at the Microsoft Campus in Reading, UK this coming 3 February (a Saturday). There is, naturally, a certain emphasis on Microsoft technologies, but not exclusively. Actually, although there are several presentations involving MS technologies, I was wrong to think that Microsoft were somehow involved in organising WebDD: they are providing sponsorship and hosting the event, but it is indeed a community-organised conference. Thanks must go to Phil Winstanley and Dave Sussman for organising this. With sessions covering Accessibility, CSS, Microformats and much more it promises to be an interesting event. Best of all, it’s “free as in beer”! Registration is opening Real Soon Now now full; my badge arrived in the post a few days ago.

Already up and running is the Backnetwork. This is the same system that Madgex developed for d.Construct 2006 (Glenn Jones of Madgex is giving a presentation on Microformats), and proved itself to be an excellent system for keeping track of contacts and following the general Flickr and blogging buzz around the event.

See you there, if my car has been healed by then. (I dread to think what the train would cost.) the car having been healed through the miracle of a few hundred pounds. (Broken trailing arm, whatever one of those is.)

Quirks or Strict: a Quick Way to Tell

Sunday, June 4th, 2006

If you’re working with (X)HTML and CSS you’ll be aware - or you need to be aware - that browsers render pages differently depending on whether they are in Strict or Quirks mode. (There are explanations of what these terms mean from Microsoft and Mozilla.) It can be useful to have a way of making certain which mode you’re in when tracking down inconsistencies in browser behaviour.

A quick and easy way to tell is to type the following snippet of JavaScript into the location bar:

javascript:alert(document.compatMode);

which will pop up a box stating either “BackCompat” for Quirks mode, or “CSS1Compat” for Strict mode.

If you’re using Firefox and have the Bookmarks toolbar visible, you can drag the following link on to it to create a handy little button you can use to check which rendering mode the browser is in on any page you visit. In Internet Explorer, right-click on the link and select “Add to Favorites…” to achieve the same thing. (You’ll get a warning that the link “may not be safe”; at that point you have to decide how much you trust me. Believe me, it’s safe.)
Rendering mode

I find this tremendously useful for doing checks on pages, particularly when editing pages by hand, where a simple typo might throw a page into Quirks mode, with resultant frustration as CSS which previously worked suddenly goes completely to pot.

(Note that the “CSS1Compat” actually means “CSS2Compat” in browsers with support for CSS 2.1.)

JavaScript Get-Together, London 2005-06-11

Monday, June 13th, 2005

I wasn’t able to make it to @media, but I did travel down to London for the JavaScript get-together in the Old Thameside Inn on Saturday afternoon. Peter K of Quirksmode had an agenda of three primary items which he anticipated eight or nine JavaScript geeks turning up to discuss; the actual figures were nearer the 30 mark, and a lot of the attendees were from the design community, so the first two parts of the meeting were instead devoted to the primary question that @media had brought up: how to get the message about the correct use of scripting out to the larger community who are already working with standards-based HTML/CSS techniques, and now want to get into the possibilities they’ve perceived through offerings like GMail and Google Maps.

Stuart Langridge and Jeremy Keith have already written up summaries of what was decided, so I won’t bother repeating them, but will move on to the discussion about the original three questions.

By the time we got onto these topics we’d moved outside, and numbers had decreased considerably; perhaps as a result of this, decisions were made fairly quickly (if they were made at all). In short, the results were:

  1. Naming: We’ll call it DOM Scripting;
  2. The dreaded onload problem: All the things you’d think would work don’t. However Mozilla has an undocumented DOMContentLoaded event (which is probably to be standardised), and Dean Edwards explained that it is possible to provide support for this using IE behaviors (.htc files). I’m planning to do some experimentation on this one to see what the best approach is when working with other browsers, although I’m probably just repeating Dean’s work.
  3. We’d all drunk enough by then that the discussion of Design Patterns drifted off into speculation about the noise a bagpipe band would make marching off a cliff and other important topics, but I’ll probably carry on with my advocacy of object oriented tehniques (suitably adapted to JavaScript’s strengths and weaknesses) until others point out how utterly wrong I am.

So to summarise, you should expect to see a lot of writing coming out from this point onwards designed to propagate the meme of DOM Scripting, which can be defined as the process of enhancing web pages by adding a behaviour layer which beefs things up using standards-based techniques, degrades gracefully when JavaScript support is absent, and doesn’t interfere with accessibility when it isn’t absent.

If you’re wondering what that last bit means, consider the revelation brought to us by Derek Featherstone: screen readers may not support JavaScript, but the browsers they read from do. Some of the implications of this are covered by Derek in this follow-up to his @media presentation, and I have no doubt it’s something we’ll hear a lot more discussion about in the future. It means we’ve got to forget about just testing with JavaScript turned off if we want to be accesible, and that means rethinking a lot of things.

Finally, thanks to everybody for making Saturday afternoon such an enjoyable and informative gathering. I hope to catch up with you all again; if not before, there’s always @media 2006.

P.S.: if you’re looking for more info about the presentations at @media, don’t miss Isofarro’s excellent notes and transcripts.