<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DOM Scripting Blog</title>
		<link>http://domscripting.com/blog/</link>
		<description>A place for thoughts and musings on JavaScript and the Document Object Model.</description>
		<language>en</language>
		<item>
			<title>Full Frontal</title>
			<link>http://domscripting.com/blog/display/121</link>
			<description><![CDATA[<p>I remember when I spoke at the first @media conference in London in 2005, mine was the only talk related to JavaScript. Just a few short years later, there was an entire @media spin-off conference devoted to JavaScript: the slightly-inaccurately named @media Ajax. JavaScript has come a long way in the past few years.</p>

<p class="vevent">This year’s be-there-or-be-square JavaScript event is the newly-announced <a href="http://2009.full-frontal.org/" class="summary url">Full Frontal conference</a> to be held at the fantastic <a href="http://www.picturehouses.co.uk/cinema_home_date.aspx?venueId=doyb" class="location">Duke Of York’s Picturehouse in Brighton</a> on <abbr class="dtstart" title="2009-11-20">November 20th</abbr>:</p>

<blockquote>
<dl><dt>full-fron•tal (JavaScript):</dt>
<dd>with nothing concealed or held back.</dd></dl>
</blockquote>

<p>It’s being organised by <span class="vcard"><a href="http://leftlogic.com/" class="fn url" rel="friend met colleague">Remy Sharp</a></span>. Doesn’t this guy ever sleep? Not content with creating <a href="http://jsbin.com/">JS Bin</a> and <a href="http://api.jquery.com/">the JQuery API browser</a>, and writing a book on <a href="http://jqueryfordesigners.com/">jQuery for Designers</a>, now he’s going to organise a conference too.</p>

<p>It looks like being an absolute bargain. A mere £100 will get you a ticket to a day of <em>serious</em> JavaScript talks from some of the smartest people in the business: <span class="vcard"><a href="http://www.wait-till-i.com/" class="fn url" rel="friend met colleague">Christian Heilmann</a></span>, <span class="vcard"><a href="http://www.quirksmode.org/" class="fn url" rel="friend met colleague">Peter-Paul Koch</a></span>, <span class="vcard"><a href="http://www.kryogenix.org/" class="fn url" rel="friend met colleague">Stuart Langridge</a></span>, <span class="vcard"><a href="http://simonwillison.net/" class="fn url" rel="friend met colleague">Simon Willison</a></span>, and more.</p>

<p>Best of all, I don’t have to travel anywhere for this conference as it’s being held in my adopted hometown of Brighton. But if you do have to travel, I can think of now better place to travel to. Come along and I’ll make sure the geeks of Brighton welcome you.</p>

<p><a href="http://www.stubmatic.com/leftlogic/event/741">Tickets are on sale now</a>.</p>
]]></description>
			<pubDate>Mon, 20 Apr 2009 16:09:11 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/121</guid>
			<comments>http://domscripting.com/blog/display/121#comments</comments>
		</item>
		<item>
			<title>Unobtrusify</title>
			<link>http://domscripting.com/blog/display/120</link>
			<description><![CDATA[<p>A little while back, <span class="vcard"><a href="http://www.hawksworx.com/" class="fn url" rel="friend met colleague">Phil Hawksworth</a></span>, a very smart web developer at Osmosoft, created <a href="http://unobtrusify.com/">Unobtrusify.com</a>. It&#8217;s a self-describing and rather lovely-looking ode to semantic markup, appropriate CSS and unobtrusive JavaScript.</p>

<p>You can <a href="http://www.hawksworx.com/journal/2009/01/05/unobtrusify-your-javascript/">read all about how it was made</a> or you can simply <a href="http://unobtrusify.com/">go and play around with it</a> &#8230;go ahead; click on stuff.</p>

<p>Phil&#8217;s co-worker <span class="vcard"><a href="http://blog.whatfettle.com/" class="fn url" rel="friend met colleague">Paul Downey</a></span> is responsible for such printed masterpieces as <a href="http://thewebisagreement.com/"><cite>The Web Is Agreement</cite></a> and <a href="http://www.flickr.com/photos/psd/2918889380/"><cite>The URI Is The Thing</cite></a>. He has now created <a href="http://www.flickr.com/photos/psd/3290532276/">a printable version of Unobtrusify</a>. Head on over to archive.org, <a href="http://www.archive.org/details/Unobtrusify">download and print</a> to your heart&#8217;s content.</p>

<p>Now I just need to find some sticky material so I can slap my copy up next to my desk.</p>
]]></description>
			<pubDate>Wed, 18 Feb 2009 17:23:47 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/120</guid>
			<comments>http://domscripting.com/blog/display/120#comments</comments>
		</item>
		<item>
			<title>Happy birthday, jQuery!</title>
			<link>http://domscripting.com/blog/display/119</link>
			<description><![CDATA[<p>jQuery was first released on January 14th, 2006. Now, precisely three revolutions of planet Earth later, <a href="http://docs.jquery.com/Release:jQuery_1.3">jQuery 1.3</a> is out.</p>

<p>This release features some significant <a href="http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/">changes and improvements</a>. There’s all the usual speed improvements, of course, but what I like in particular is the way that jQuery is ditching browser sniffing in favour of feature detection. That’s the way to do it.</p>

<p>The way the community is developing is as interesting as the code. <a href="http://sizzlejs.com/">Sizzle</a>, the CSS selector engine inside jQuery, has been spun off into its own standalone project so that it can be used by other libraries and frameworks. Meanwhile, the jQuery project itself is coming under the banner of the <a href="http://conservancy.softwarefreedom.org/">Software Freedom Conservancy</a> to formalise its standing as free and open software.</p>

<p>Congratulations to <span class="vcard"><a href="http://ejohn.org/" rel="friend met colleague" class="url"><abbr title="John Resig" class="fn">John</abbr></a></span> and the rest of the team. Congratulations also to fellow Brightonian <span class="vcard"><a href="http://remysharp.com/" class="url fn" rel="friend met colleague">Remy Sharp</a></span> for putting together the very handy <a href="http://api.jquery.com/">jQuery API browser</a>. The boy done good.</p>
]]></description>
			<pubDate>Wed, 14 Jan 2009 20:55:25 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/119</guid>
			<comments>http://domscripting.com/blog/display/119#comments</comments>
		</item>
		<item>
			<title>Pasty</title>
			<link>http://domscripting.com/blog/display/118</link>
			<description><![CDATA[<p>A <a href="http://en.wikipedia.org/wiki/Pastebin" rel="tag">paste bin</a> is a very handy tool when you&#8217;re working as part of a team, especially if there&#8217;s any remote work involved. Basically, they&#8217;re web-based clipboards where you can paste in snippets of text&#8212;JavaScript, CSS, markup or whatever&#8212;and then share the URL in an email or a chat message (a lot cleaner than pasting code straight into an email or chat window). Often you can specify a life span for the snippet so, for example, if nobody visits the page for a three month period, the URL rots.</p>

<p>At <a href="http://clearleft.com/">Clearleft</a>, we often use <a href="http://pastebin.com/">pastebin.com</a> though I&#8217;ve also used <a href="http://dpaste.com/">dpaste</a> in the past. I like the way that pastebin allows you to create subdomains on the fly: just type in the URL to create it.</p>

<p>These services are great for collaborative debugging but they have one slight flaw when it comes to client-side work. JavaScript and CSS don&#8217;t exist in isolation; they are used to enhance an existing HTML document. So passing around a snippet of JavaScript or CSS might not be much good unless it is accompanied by the corresponding markup.</p>

<p>Enter <a href="http://jsbin.com/">JS Bin</a> from <span class="vcard"><span class="adr"><span class="locality">Brighton</span></span>&#8217;s own <a href="http://remysharp.com/" class="fn url" rel="acquaintance met colleague">Remy Sharp</a></span>, the man behind the superb <a href="http://leftlogic.com/lounge/articles/microformats_bookmarklet/">microformats bookmarklet</a>. This is a paste bin with a twist. As well as being able to share a snippet of JavaScript, you provide the markup that the JavaScript is acting on as well. If you&#8217;ve been sent a JS Bin URL, you can play around with the JavaScript and/or the markup, saving as you go.</p>

<p>There are some other nice touches too, like the ability to include a JavaScript library at the flick of a dropdown. For a proper explanation, be sure to <a href="http://jsbin.com/about">watch the screencast</a> that Remy has recorded.</p>
]]></description>
			<pubDate>Mon, 29 Sep 2008 17:22:35 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/118</guid>
			<comments>http://domscripting.com/blog/display/118#comments</comments>
		</item>
		<item>
			<title>Standalone selector</title>
			<link>http://domscripting.com/blog/display/117</link>
			<description><![CDATA[<p><span class="vcard"><a class="fn url" href="http://ejohn.org/" rel="friend met colleague">John Resig</a></span> is a machine. Not content with dividing his time between working on <a href="http://jquery.com/">jQuery</a> and working on <a href="http://getfirebug.com/">Firebug</a>, he&#8217;s also got another few irons in the fire.</p>

<p>Just for kicks, John has created <a href="http://github.com/jeresig/sizzle/tree/master">a standalone selector engine called Sizzle</a>. It&#8217;s not quite ready for prime time yet but it looks very promising. It uses the CSS syntax that has helped make jQuery such a popular library. Right now, the code is coming in at less than 4<abbr title="Kilobytes">K</abbr>!</p>

<p>I really, really like this modular approach to writing JavaScript. Instead of bloating a library with <em>more</em> features, the components of the library are instead being split into separate standalone pieces. I wonder if the same thing will happen with event handling and effects. Those three actions (selector, event, effect) probably make up 80% of jQuery use cases:</p>

<pre><code>jQuery(selector).event(function() {
 effect();
});
</code></pre>

<p>For an event of a different kind, there&#8217;s a <span class="vevent"><a href="http://events.jquery.com/" class="summary url">jQuery Camp</a> scheduled for <abbr class="dtstart" title="2008-09-28">September 28th</abbr>, the day before The Ajax Experience in <span class="location">Boston</span></span>. The exact location has yet to be determined but given the number of jQuery fanboys out there, I&#8217;m guessing it won&#8217;t be &#8216;round at John&#8217;s house. There&#8217;s a nominal registration fee of $50 to cover lunch. If you use jQuery and you find yourself anywhere on the eastern seaboard of the United States at the end of September, you should probably register now.</p>

<p>In his spare time, John likes to relax by <a href="http://ejohn.org/blog/processingjs/">porting the Processing visualisation language to JavaScript</a>. Freak.</p>
]]></description>
			<pubDate>Mon, 25 Aug 2008 12:44:28 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/117</guid>
			<comments>http://domscripting.com/blog/display/117#comments</comments>
		</item>
		<item>
			<title>The need for speed</title>
			<link>http://domscripting.com/blog/display/116</link>
			<description><![CDATA[<p>Another day, <a href="http://jquery.com/blog/2008/06/04/jquery-126-events-100-faster/">another incremental release of jQuery</a>. This one is sporting 13% faster CSS selectors and 103% faster event handlers.</p>

<p>Meanwhile, as the JavaScript libraries continue to evolve and improve, the browser engines are also focusing on speed improvements. Dave Hyatt and the WebKit gang have announced <a href="http://webkit.org/blog/189/announcing-squirrelfish/">a brand new JavaScript engine called SquirrelFish</a>. This looks like being about 60% faster than the previous WebKit interpreter so you can expect quite a speed boost in the next version of Safari.</p>

<p>If you&#8217;re interested in what happens under the hood with Squirrel Engine, Dave shares some of the philosophical underpinnings:</p>

<blockquote>
  <p>SquirrelFish owes a lot of its design to some of the latest research in the field of efficient virtual machines, including research done by Professor M. Anton Ertl, et al, Professor David Gregg, et al, and the developers of the Lua programming language.</p>
</blockquote>

<p>You can find plenty of gory details on <a href="http://webkit.org/blog/">the Surfin&#8217; Safari blog</a>.</p>
]]></description>
			<pubDate>Wed, 04 Jun 2008 16:57:54 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/116</guid>
			<comments>http://domscripting.com/blog/display/116#comments</comments>
		</item>
		<item>
			<title>Radio on the TV</title>
			<link>http://domscripting.com/blog/display/115</link>
			<description><![CDATA[<p>I was in the illustrious surroundings of <a href="http://www.therissingtonpodcast.co.uk/">Rissington</a> last week to deliver a DOM Scripting workshop. My good friend <cite class="vcard"><a href="http://pixeldiva.co.uk/" rel="friend met colleague" class="url"><abbr title="Ann McMeekin" class="fn">Ann</abbr></a></cite> was in attendance. During the latter part of the workshop — which was deliberately more loosely structured than the rest of the day — she pointed me to a really lovely bit of JavaScript form enhancement.</p>

<p>Take a look at <a href="http://uk.tv.yahoo.com/">the UK and Ireland TV and radio listings on Yahoo</a>. See that search form in the upper right corner? It’s using the standard design pattern of allowing you to specify exactly where you’re searching. But unlike most implementations, this one is built on a rock-solid foundation of semantic markup.</p>

<p><a href="http://nascentguruism.com/journal/search-and-ye-shall-fail">Steve Marshall has the lowdown</a>. Under the hood the form is using radio buttons for choosing where to search. Then, using a combination of JavaScript and CSS, this default representation is augmented to look and behave as desired. Switch off JavaScript and you can still use the search form perfectly well.</p>

<p>What impresses me about this isn’t so much the code (although I’m sure it’s top-notch), it’s the thinking behind the implementation: start with solid semantic markup with good ol’ fashioned form elements for interaction; <em>then</em> think about how it can be enhanced. Nice one, <cite class="vcard"><a href="http://nascentguruism.com/" class="url" rel="friend met colleague"><abbr class="fn" title="Steve Marshall">Steve</abbr></a></cite>.</p>
]]></description>
			<pubDate>Sun, 11 May 2008 15:06:14 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/115</guid>
			<comments>http://domscripting.com/blog/display/115#comments</comments>
		</item>
		<item>
			<title>Comprehension</title>
			<link>http://domscripting.com/blog/display/114</link>
			<description><![CDATA[<p>Don&#8217;t tell <span class="vcard"><a href="http://boagworld.com/" class="url" rel="friend met colleague"><abbr class="fn" title="Paul Boag">Paul</abbr></a></span> but I sometimes listen to <a href="http://www.boagworld.com/podcast/">the Boagworld podcast</a>. I&#8217;m sharing this dark secret with you because recently the podcast featured <a href="http://www.boagworld.com/archives/2008/02/113_hiring.html">a good interview with Christian Heilmann</a>.</p>

<p><cite class="vcard"><a href="http://www.wait-till-i.com/" class="url" rel="friend met colleague"><abbr title="Christian Heilmann" class="fn">Christian</abbr></a></cite> talks about best and worst practices in writing JavaScript today. It&#8217;s well worth a listen.</p>

<p>But when the subject turns to Object Oriented Programming, Christian makes a pointed reference:</p>

<blockquote>
  <p>And there&#8217;s not much magic to it. I mean I get annoyed when I see JavaScript guys going on stage and saying like: <q>Well guys, this is a function and when it&#8217;s an object it&#8217;s a method and why should I know this?</q> Well you should know this because you need to communicate with other developers as well sooner or later.</p>
</blockquote>

<p>Um&#8230; that would be me. In my books, presentations and workshops I&#8217;ve often explained methods and properties as being like functions and variables, just within the scope of an object (hence the dot syntax). But I never, <em>ever</em> said <q>And why should I know this?</q></p>

<p>What I was trying to do was explain objects using reference points that I think most people will understand. I know that for me personally I had a lightbulb moment when I grokked methods and properties as being like functions and variables. The whole point of explaining this terminology is precisely so that people can communicate with other developers. As Christian says:</p>

<blockquote>
  <p>And these people speak that lingo and rather than you having to explain yourself for 15 minutes you could communicate in 3 minutes.</p>
</blockquote>

<p>Exactly! That&#8217;s why I think it&#8217;s important that I take the time to at least explain the terminology of objects (<abbr title="that is">i.e.</abbr> methods and properties) even if I don&#8217;t delve into the technical details. My aim, like Christian, is to encourage better understanding and communication.</p>

<p>Evidently Christian takes issue with my teaching techniques. That&#8217;s fine. But I wish he wouldn&#8217;t put words in my mouth by claiming that I&#8217;m telling people that they shouldn&#8217;t have to learn the terminology around JavaScript objects.</p>

<p>Then again&#8230; maybe his comment wasn&#8217;t aimed at me at all and there is some other conference speaker out there who is going around telling people that they don&#8217;t have to know what the words &#8220;method&#8221; and &#8220;property&#8221; mean. If that&#8217;s true, then I agree with Christian. Such exhortations are not useful. But in lieu of any source for Christian&#8217;s imaginings of what he thinks he heard, I&#8217;ll take the egotistical paranoid route and assume he&#8217;s talking about me.</p>

<p>Anyway, I guess I&#8217;ll have to make sure from now on that I&#8217;m clearer about what I&#8217;m saying. More importantly, I&#8217;ll have to make sure that I&#8217;m clear on what I&#8217;m <em>not</em> saying.</p>
]]></description>
			<pubDate>Wed, 19 Mar 2008 11:47:49 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/114</guid>
			<comments>http://domscripting.com/blog/display/114#comments</comments>
		</item>
		<item>
			<title>ABBRacadabra</title>
			<link>http://domscripting.com/blog/display/113</link>
			<description><![CDATA[<p>In <cite>Chapter 8</cite> of <a href="http://domscripting.com/book/">the <cite>DOM Scripting</cite> book</a> I’ve got a little script that looks through the contents of an HTML document, finds any instances of the <code>abbr</code> element and then constructs a definition list with the information contained within them. Then there’s a section in the chapter called <cite>A browser bomb</cite> in which I explain how the script needs to be forked because Internet Explorer refuses to recognise the <code>abbr</code> element—part of a longstanding spat with Netscape. This means not only that you can’t do any scripting on abbreviations, you can’t style them either.</p>

<p>But now it turns out that <a href="http://ejohn.org/blog/html5-shiv/">Internet Explorer has an interesting quirk</a>. If you write:</p>

<pre><code>document.createElement("abbr");
</code></pre>

<p>…suddenly the browser recognises the element and you are free to script and style abbreviations (you don’t even need to append that newly-created element to the document). This applies to any elements that IE doesn’t recognise, which could be very hand in migrating to <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML5</a>.</p>

<p>It doesn’t qualify as an error so I’m not going to add it to <a href="http://domscripting.com/book/errata/">the errata</a> but I sure wish I had known about this when I was writing the book.</p>
]]></description>
			<pubDate>Mon, 28 Jan 2008 18:24:53 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/113</guid>
			<comments>http://domscripting.com/blog/display/113#comments</comments>
		</item>
		<item>
			<title>Bulletproof Ajax workshop in Brighton</title>
			<link>http://domscripting.com/blog/display/112</link>
			<description><![CDATA[<p class="vevent">My first public appearance in 2008 is coming up <abbr class="dtstart" title="2008-01-25T09:30:00">in two weeks</abbr>. I’ll be spending <abbr class="dtend" title="2008-01-25T17:00:00">a day</abbr> delivering a <a class="url summary" href="http://clearleft.com/training/ajax/20080125/">Bulletproof Ajax workshop</a>. In case you couldn’t tell from the title, it’s <span class="description">based on <a href="http://bulletproofajax.com/">the book</a> of the same name</span> (wot I wrote). The workshop will be held in the cosy and comfy environs of the <span class="vcard"><a href="http://clearleft.com/" class="fn org">Clearleft</a> office building in the heart of <span class="location adr"><span class="locality">Brighton</span></span></span>.</p>

<p>This is an entry-level introduction to the hows and whys of implementing Ajax. I’ve given this workshop <a href="http://domscripting.com/blog/display/99">before</a> and it’s always gone smoothly though I think I might update some of the material; maybe ditch some of the introductory DOM Scripting stuff and spend more time on implementation and design challenges. I’d love to do more hands-on stuff and get people writing stuff but I find this a real challenge when it comes to code (it’s a lot easier with something simple like <a href="http://microformats.org/">microformats</a>). I’d be interested in hearing any ideas for making this workshop more interactive.</p>

<p>If you can convince your boss to part with the asking price of £395 per person, maybe I’ll see you on January 25th and we can climb that Ajax learning curve together.</p>
]]></description>
			<pubDate>Fri, 11 Jan 2008 11:48:25 GMT</pubDate>
			<guid>http://domscripting.com/blog/display/112</guid>
			<comments>http://domscripting.com/blog/display/112#comments</comments>
		</item>
   </channel>
</rss>