<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Infrequently Noted &#187; dhtml</title>
	<atom:link href="http://infrequently.org/category/dhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://infrequently.org</link>
	<description></description>
	<lastBuildDate>Tue, 01 May 2012 11:30:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Bedrock</title>
		<link>http://infrequently.org/2012/04/bedrock/</link>
		<comments>http://infrequently.org/2012/04/bedrock/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 05:41:28 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[dhtml]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1789</guid>
		<description><![CDATA[Jetlag has me in its throes which is as good an excuse as any to share what has been keeping me up many nights over the past couple of years; a theory of the web as a platform. I had a chance last week to share some of my thinking here to an unlikely audience [...]]]></description>
			<content:encoded><![CDATA[<p>Jetlag has me in its throes which is as good an excuse as any to share what has been keeping me up many nights over the past couple of years; a theory of the web as a platform.</p>
<p>I had a chance last week to share some of my thinking here to an unlikely audience at <a href="http://www.eclipsecon.org/2012/keynotes">EclipseCon</a>, a wonderful experience for which my thanks go to Mike Milinkovich and Ian Skerrett for being crazy enough to invite a &#8220;web guy&#8221; to give a talk.</p>
<p>One of the points I tried (and perhaps failed) to make in <a href="http://infrequently.org/12/eclipsecon/#1">the talk</a> was that in every platform that&#8217;s truly a <em>platform</em> it&#8217;s important to have a stable conceptual model of what&#8217;s &#8220;down there&#8221;. For Java that&#8217;s not the language, it&#8217;s the JVM. For the web&#8230;well&#8230;um. Yes, it bottoms out at C/C++, but that&#8217;s mostly observable through spooky action at a distance. The expressive capacity of C/C++ show up as limitations and mismatches in web specs all the time, but the essential semantics &#8212; C/C++ is just words in memory that you can do whatever you please with &#8212; are safely hidden away behind APIs and declarative forms that are unfailingly high-level. Until they aren&#8217;t. And you can forget about composition most of the time.</p>
<p>For a flavor of this, I always turn back to <a href="http://blog.j15r.com/">Joel Webber&#8217;s</a> question to me several years ago: why can&#8217;t I over-ride the rendering of a border around an HTML element?</p>
<p>It&#8217;s a fair question and one I wrote off too quickly the first time he posed it. We have <code>&lt;canvas&gt;</code> which lets us draw lines however we like, so why can&#8217;t we override the path painting for borders? Why isn&#8217;t it just a method you implement like in Flex or Silverlight?</p>
<p>Put another way: there are some low level APIs in the web that <em>suggest</em> that such power should be in the hands of us mortals. When using a low-level thing, you pay-as-you-go since lower-level things need more code (latency and complexity)&#8230;but that&#8217;s a choice. Today&#8217;s web is often mysteriously devoid of the sort of sane layering, <em>forcing</em> you to re-build parallel systems to what&#8217;s already in the browser to get a job done. You can&#8217;t just subclass the right thing or plug into the right lifecycle method most of the time. Want a <code>&lt;canvas&gt;</code>? Fine. There you go. Want a <code>&lt;span&gt;</code>? Hot <code>&lt;span&gt;</code>s coming up! But don&#8217;t go getting any big ideas about using the drawing APIs from <code>&lt;canvas&gt;</code> to render your <code>&lt;span&gt;</code>. Both are magic in their own right and for no reason other than that&#8217;s the way it has always been.</p>
<p>The craziest part in all of this is that JavaScript <em>does</em> exist in the web so you can strictly speaking do whatever you want. Goodness knows that when the platform fails us today, we&#8217;re all-too-willing to just throw JS at it. It&#8217;s crazy, in this context then, that spec authors seem to be trying to uphold a golden principle: JavaScript <em>doesn&#8217;t</em> exist. Writing it out of the story allows you to just claim that your bit of the system is magic and that it doesn&#8217;t need an exposed lifecycle and plug-in architecture. New things can just be bolted onto the magic, no layering required. It&#8217;s magical turtles all the way down.</p>
<p>You can see why people who think in terms of VM&#8217;s and machine words might find this a bit <em>ahem</em> limiting.</p>
<p>But how much should we &#8220;web people&#8221; care about what they think? After all, &#8220;real programmers&#8221; have been predicting the imminent death of this toy browser thing for so long that I&#8217;m forgetting exactly when the hate took its various turns through the 7 stages; &#8220;Applets will save us from this insanity!&#8221;&#8230;&#8221;Ajax is a hack&#8221;&#8230;&#8221;just put a compiler in front of it and treat it as the dumbest assembler ever&#8221; (which is at least acceptance, of a sort). The web continues to succeed in spite of all of of this. So why bother with the gnashing of teeth?</p>
<p>Thanks to <a href="http://httparchive.org/trends.php">Steve Souders, I have an answer</a>: every year we&#8217;re throwing more and more JS on top of the web, dooming our best intended semantic thoughts to suffocation in the Turing tar pit. Inexorably, and until we find a way to send less code down the wire, us is them, and more so every day.</p>
<p><img style="height: 300px; width: 450px;" src="http://chart.apis.google.com/chart?chd=t:-1|12,11,12,12,12,12,12,12,12,12,13,13,13,13,13,14,14,13,14,14,14,14,14,13,14,14,14,14,14,14,14,14|-1|113,113,115,115,116,117,117,119,121,123,125,125,126,128,131,135,139,137,140,144,147,148,152,155,161,167,172,170,173,175,179,180&amp;chxl=0:|+%7C11%2F30%7C+%7C+%7C1%2F21%7C+%7C+%7C2%2F26%7C+%7C+%7C4%2F15%7C+%7C+%7C6%2F1%7C+%7C+%7C7%2F15%7C+%7C+%7C9%2F1%7C+%7C+%7C10%2F15%7C+%7C+%7C12%2F1%7C+%7C+%7C1%2F15%7C+%7C+%7C3%2F1&amp;chxt=x,y,r&amp;chs=450x300&amp;cht=lxy&amp;chco=E63C0B,982807&amp;chm=N,E63C0B,0,1::3,12,,h::8|N**kB,982807,1,1::3,12,,h::8&amp;chds=9,99,0,30,9,99,100,200&amp;chts=982807,24&amp;chtt=JS+Transfer+Size+%26+JS+Requests&amp;chma=5,5,5,25&amp;chls=1,6,3|1&amp;chxr=1,100,200,20|2,0,30,10&amp;chxs=1,982807,11.5,-0.5,lt,982807,982807|2,E63C0B,11.5,-0.5,lt,E63C0B,E63C0B&amp;chxtc=0,4|1,4&amp;chxp=0&amp;chdl=JS+Requests|JS+Transfer+Size+(kB)&amp;chdlp=bv|r"/></p>
<p>Let that picture sink in: at 180KB of JS on average, script isn&#8217;t some helper that gives meaning to pages in the breech, it <em>is</em> the meaning of the page. Dress it up all you like, but that&#8217;s where this is going.</p>
<p>Don&#8217;t think 180KB of JS is a lot? Remember, that&#8217;s <em>transfer size</em> which accounts for gzipping, not total JS size. Oy. And in most cases that&#8217;s more than 3x the size of the HTML being served (both for the page and for whatever iframes it embeds). And that&#8217;s not all; it&#8217;s worse for many sites which should know better. Check out those loading &#8220;filmstrip&#8221; views for <a href="http://httparchive.org/viewsite.php?pageid=905867">gawker</a>, <a href="http://httparchive.org/viewsite.php?pageid=903377">techcrunch</a>, and <a href="http://httparchive.org/viewsite.php?pageid=903208">the NYT</a>. You might be scrolling down, looking at the graphs, and thinking to yourself &#8220;looks like Flash is the big ticket item&#8230;&#8221;, and while that&#8217;s true in absolute terms, Flash isn&#8217;t what&#8217;s blocking page loads. <a href="http://httparchive.webpagetest.org/video/compare.php?tests=120315_8F_QAVB-r:1-c:0">JS is</a>.</p>
<p>And what for? What&#8217;s all that code doing, anyway?</p>
<p>It&#8217;s there for three reasons: first, to clean up the messes that browser vendors aren&#8217;t willing or able to clean up for themselves; second, to provide an API that becomes the new platform, and lastly to provide the app-specific stuff you are trying to get across. Only the last one is strictly valuable. You&#8217;re not including JQuery, Backbone, Prototype or Dojo into your pages <em>just</em> because you like the API (if you are, stop it). You&#8217;re doing it because the combination of API and even behavior across browsers makes them the <em>bedrock</em>. They are the new lisp of application construction; the common language upon which you and your small team can agree; just don&#8217;t expect anyone else to be able to pick up your variant without squinting hard.</p>
<p>This is as untenable as it is dangerous. It was this realization that set me and <a href="https://plus.google.com/111648463906387632236/posts">Dimitri Glazkov</a> off to build a team to do something about it more than a year and a half ago. The results are showing up now in the form of <a href="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html">Web Components and Shadow DOM</a>, <a href="http://www.youtube.com/watch?v=eRZ4pO0gVWw">Mutation Observers</a> as plumbing for <a href="http://code.google.com/p/mdv/">Model Driven View</a>, and a host of new CSS capabilities and JavaScript language expressiveness wins. If that sounds like a huge pile of seemingly un-related work, let me walk back to one of the motivating questions and then I&#8217;ll fast forward to the approach:</p>
<blockquote><p>What would it mean to be able to subclass an HTML Element?</p></blockquote>
<p>We observed that most of what the current libraries and frameworks are doing is just trying to create their own &#8220;widgets&#8221; and that most of these new UI controls had a semantic they&#8217;d like to describe in a pretty high-level way, an implementation for drawing the current state, and the need to parent other widgets or live in a hierarchy of widgets.</p>
<p>Heeeeeyyyyyy&#8230;.wait a minute&#8230;that sounds a lot like what HTML does! And you even have HTML controls which generate extra elements for visual styling but which you can&#8217;t access from script. This, BTW, is what you want when building your own controls. Think the bullets of list items or the sliders generated by <code>&lt;input type="range"&gt;</code>. There are even these handy (<a href="http://infrequently.org/2011/10/real-constructors-webidl-last-call/">non-constructable!?!</a>) constructors for the superclasses in JS already.</p>
<p>So what would you need access to in order to plug into that existing system? And how should it be described? This, by the way, is the danger zone. Right about this point in the logical chain most folks tend to fall back to what they know best: C++ hacker? Give &#8216;em a crappy C++-inspired high-level-ish JS API that will make the people yelling loudest stop beating you up. Declarative guy? Force everyone to describe their components as separate documents and&#8230;yeah. XUL. You get the idea. JavaScript person? Demand the lowest level API and as much unwarranted power as possible and pretend you don&#8217;t need the browser. JS libraries are the &#8220;fuck it, we&#8217;ll do it live!&#8221; of the web.</p>
<p>None of these are satisfying. Certainly not if what we want is a platform of the sort you might consider using &#8220;naked&#8221;. And if your &#8220;platform&#8221; always needs the same shims here and polyfills there, let me be candid: it ain&#8217;t no platform. It&#8217;s some timber and bolts out of which you can make a nice weekend DIY project of building a real platform.</p>
<p>So we need to do better.</p>
<p>What does better look like?</p>
<p>Better is layered. Better is being able to just replace what you need, to plug in your own bits to a whole that supports that instead of making you re-create everything above any layer you want to shim something into. This is why mutable root prototypes in JS and object mutability in general are such cherished and loathed properties of the web. It <em>is</em> great power. It&#8217;s just a pity we need it so often. Any plan for making things better that&#8217;s predicated on telling people &#8220;oh, just go pile more of your own parallel systems on top of a platform that already does 90% of what you need but which won&#8217;t open up the API for it&#8221; is <b><em>DOOMED</em></b>.</p>
<p>Thus began a archaeology project, one which has differed in scope and approach from most of the recently added web capabilities I can think of, not because it&#8217;s high-level or low-level, but because it is layered. New high-level capabilities are added, but instead of then poking a hole nearly all the way down to C++ when we want a low-level thing, the approach is to look at the high-level thing and say:</p>
<blockquote><p>How would we describe what it&#8217;s doing at the next level down in an API that we could expose?</p></blockquote>
<p>This is the reason low-level-only API proposals drive me <em>nuts</em>. New stuff in the platform tends to be driven by <em>scenarios</em>. You want to do a thing, that thing probably has some UI (probably browser provided), and might invoke something security sensitive. If you start designing at the lowest level, throwing a C++ API over the wall, you&#8217;ve turned off any opportunity or incentive to layer well. Just tell everyone to use the very fine JS API, after all. Why should anyone want more? (hint: graph above). Instead of opening doors, though, it&#8217;s mostly burden. Everything you have to do from script is expensive and slow and prone to all sorts of visual and accessibility problems by default. If the browser can provide common UI and interaction for the scenario, isn&#8217;t that better <em>most</em> of the time? Just imagine how much easier it would be to build an app if the initial cut at location information had been <code>&lt;input type="location"&gt;</code> instead of the <a href="http://dev.w3.org/geo/api/spec-source.html">Geolocation API we have now</a>. True, that input element would need lots of configuration flags and, eventually, a fine-grained API&#8230;if only there were a way to put an API onto an HTML element type&#8230;hrm&#8230;</p>
<p>In contrast, if we go declarative-only we get a lot of the web platform today. Fine at first but horrible to work with over time, prone to attracting API barnacles to fill perceived gaps, and never quite enough. The need for that API keeps coming back to haunt us. We&#8217;re gonna need both sides, markup and imperative, sooner or later. A framework for thinking about what that might look like seems in order. Our adventure in excavation with Web Components has largely been a success, not because we&#8217;re looking to &#8220;kernalize the browser&#8221; in JS &#8212; good or bad, that&#8217;s an idea with serious reality-hostile properties as soon as you add a network &#8212; but because when you force yourself to think about what&#8217;s <em>already</em> down there as an API designer, you start making connections, finding the bits that are latent in the platform and should be used to explain more of the high level things in terms of fewer, more powerful primitives at the next layer down. This isn&#8217;t a manifesto for writing the whole world in JS; it&#8217;s a reasonable and practical approach for how to succeed by starting high and working backwards from the 80% use-case to something that eventually has most of the flexibility and power that high-end users crave.</p>
<p>The concrete steps are:</p>
<ol>
<li>Introduce new platform capabilities with high-level, declarative forms. I.e., <em><b>invent new tags and attributes</b></em>. DOM gives you an API for free when you do it that way. Everyone&#8217;s a winner.
</li>
<li>When the thing you want feels like something that&#8217;s already &#8220;down there&#8221; somewhere, try to <em><b>explain</b></em> the bits that already exist in markup in terms of a lower-level JS or markup primitive. If you can&#8217;t do that or you think your new API has no connection to markup, go back to step 1 and start again.
</li>
<li>When it feels like you&#8217;re inventing new language primitives in DOM just to get around JS language limitations, <em><b>extend the language</b></em>, not the API
</li>
</ol>
<p>On the web, JavaScript <em>is</em> what&#8217;s down there. When it&#8217;s not, we&#8217;re doing it wrong. It has taken me a very long time to understand why the Java community puts such a high premium on the &#8220;pure java&#8221; label, and fundamentally what it says to others in the community is &#8220;I appealed to no gods and no magic in the construction of this, merely physics&#8221;. That&#8217;s a Good Thing (TM), and the sort of property that proper platforms should embody to the greatest extent possible.</p>
<p>And this brings me to my final point. C/C++ might be what&#8217;s &#8220;down there&#8221; for web browsers, but that&#8217;s also been true of Java. What separates the web and Java, however, is that the Java community sees their imperative abstraction that keeps them from having to think about memory correctness (the JVM) as an <em>asset</em> and many &#8220;web people&#8221; think of JS as pure liability. I argue that because of the &#8220;you&#8217;re gonna need both sides&#8221; dynamic, trying to write JS out of the picture is a dumb as it is doomed to fail. JavaScript <em>is</em> what&#8217;s &#8220;down there&#8221; for the web. The web has an imperative backbone and we&#8217;re never going to expose C/C++ ABI for it, which means JS is our imperative successor. The archaeological dig which is adding features like Web Components is providing more power to JS by the day and if we do this right and describe each bit as a layer with an API that the one above builds on, we can see pretty clearly how the logical regress of the &#8220;you must use JS to implement the whole browser&#8221; isn&#8217;t insane. JS itself is implemented as C/C++, so there&#8217;s always room for the mother tongue and of course many of the APIs that we interact with from JS must be C/C++; you can&#8217;t write it out of the story &#8212; but that doesn&#8217;t mean we need to design our APIs there or throw bad design decisions over the wall for someone else to clean up. It is high time we started designing low-level stuff for the web in idiomatic JS (not IDL), start describing the various plug-in points for what they are. We can provide power from our imperative abstraction <em>to</em> and <em>through</em> our declarative layer in ways that make both high and low-level users of the web platform more able to interoperate, build on each other&#8217;s work, and deliver better experiences at reasonable cost. That&#8217;s the difference between a minefield and a platform. Only one of them is reasonable to build on.</p>
<p>The trash truck just came by which means it&#8217;s 6AM here in almost-sunny London. WordPress is likewise telling me that I&#8217;m dangerously out of column-inches, so I guess I&#8217;ll see if I can&#8217;t get a last hour or two of sleep before the weekend is truly over. The arguments here may not be well presented, and they are subtle, but layering matters. We don&#8217;t have enough of it and when done well, it can be a powerful tool in ending the battle between imperative and declarative. I&#8217;ll make the case some other time for why custom element names are a good idea, but consider it in the layered context: if I could subclass <code>HTMLElement</code> from JavaScript in the natural way, why can&#8217;t I just put a new tag name in the map the parser is using to create instances of all the other element types? Aside from the agreement about the names, what makes the built-in elements so special, anyway?</p>
<p>Cognitive dissonance, ahoy! You&#8217;re welcome <img src='http://infrequently.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><b>Note:</b> this post has evolved in the several days since its initial posting, thanks largely to feedback from <a href="https://plus.google.com/112108146349792378878/posts">Annie Sullivan</a> and <a href="http://souders.org/">Steve Souders</a>. But it&#8217;s not their fault. I promise.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/04/bedrock/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>OSCON dojo.beer() Tonight!</title>
		<link>http://infrequently.org/2009/07/oscon-dojo-beer-tonight/</link>
		<comments>http://infrequently.org/2009/07/oscon-dojo-beer-tonight/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 14:50:12 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[dojo.beer]]></category>
		<category><![CDATA[oscon]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=1041</guid>
		<description><![CDATA[Sorry for the late notice, but the inimitable Matthew Russell has organized another dojo.beer() event for 7pm tonight (Wed, July 22nd) at O&#8217;Flaherty&#8217;s pub in San Jose, near the convention center. Should be a great time, so if you&#8217;re in the area, hopefully we&#8217;ll see you there!]]></description>
			<content:encoded><![CDATA[<p>Sorry for the late notice, but the inimitable <a href="http://dojotdg.zaffra.com/">Matthew Russell</a> has <a href="http://www.dojotoolkit.org/2009/07/22/dojo-beer-oscon-09">organized another dojo.beer() event</a> for 7pm tonight (Wed, July 22nd) at <a href="http://www.oflahertyspub.com/">O&#8217;Flaherty&#8217;s pub in San Jose, near the convention center</a>. Should be a great time, so if you&#8217;re in the area, hopefully we&#8217;ll see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/07/oscon-dojo-beer-tonight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dojo 1.3 Is Out!</title>
		<link>http://infrequently.org/2009/03/dojo-13-is-out/</link>
		<comments>http://infrequently.org/2009/03/dojo-13-is-out/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 15:52:58 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dhtml]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[dojo13]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=905</guid>
		<description><![CDATA[Dojo 1.3 is here! (download site) If you&#8217;re already using Dojo, this should be a no-brainer upgrade. It&#8217;s out-and-out better. As a quick example, dojo.create("tagname", { /*properties*/ }) is now the preferred way to build DOM nodes quickly. Its simple API will be natural to anyone who has used dojo.attr(). Even better, Pete&#8217;s exciting PlugD [...]]]></description>
			<content:encoded><![CDATA[<p>Dojo 1.3 <a href="http://www.dojotoolkit.org/2009/03/31/dojo-1-3-now-available">is here</a>! (<a href="http://download.dojotoolkit.org/release-1.3.0/">download site</a>)</p>
<p>If you&#8217;re already using Dojo, this should be a no-brainer upgrade. It&#8217;s out-and-out better. As a quick example, <code>dojo.create("tagname", { /*properties*/ })</code> is now the preferred way to build DOM nodes quickly. Its simple API will be natural to anyone who has used <code>dojo.attr()</code>. Even better, Pete&#8217;s <a href="http://code.google.com/p/plugd">exciting PlugD version of dojo.js has been updated to 1.3 as well</a>.</p>
<p>1.3&#8242;s Core features the new &#8220;Acme&#8221; CSS selector engine which provides a big boost in speed for many operations in the fast-path. <a href="http://alex.dojotoolkit.org/2009/03/dojo-13b3-is-out/">I blogged before</a> about the work we did to make Acme fast, and rest assured it is (in aggregate, across all use cases) quicker than any other selector system you can get your hands on today. But selector performance isn&#8217;t where it&#8217;s really at, and I&#8217;ve been saying that for a long time. </p>
<p>Luckily, Pete Higgins decided to prove it and has been working on a new set of benchmarks with the help of other toolkit vendors (to ensure fairness) called &#8220;<a href="http://dante.dojotoolkit.org/taskspeed/">TaskSpeed</a>&#8220;. Dojo 1.3 wins by a wide margin. Across all the reported browsers so far, <b>Dojo is <em>at least</em> 2 times faster than other toolkits on common DOM operations</b>. We&#8217;ve worked very hard over the years to make sure that Dojo&#8217;s APIs don&#8217;t encourage you to do things that will hurt you later, and TaskSpeed finally shows how much this philosophy pays off:</p>
<p><a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html"><img src="http://alex.dojotoolkit.org/wp-content/uploads/2009/03/taskspeed.png" alt="taskspeed" title="taskspeed" width="560" height="400" class="aligncenter size-medium wp-image-916" /></a></p>
<div style="padding-left: 3em; padding-right: 3em;"><i>The numbers above are from <a href="http://dante.dojotoolkit.org/taskspeed/">TaskSpeed</a>, a new toolkit benchmark developed by Pete Higgins with tests contributed by other toolkit authors to ensure fairness. Shorter is better.</i></div>
<p><strike>Given that DOM is the primary bottleneck in most apps</strike> <em>DOM is a big bottleneck in today&#8217;s apps, usually just behind network I/O</em> and these tests demonstrate how Dojo&#8217;s approach to keeping things fast pays off not just on micro benchmarks like CSS selector speed, performance improvements to single toolkit functions, or even file size &#8211; but on aggregate performance where it really matters. Dojo&#8217;s modern, compact syntax for these common operations doesn&#8217;t slow it down, either. For instance, if you go check out the <a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html">TaskSpeed reporting page</a>, you&#8217;ll see that where browsers are slowest (IE6/7/8, etc.), Dojo&#8217;s focus on performance pays off most. Why use a toolkit that&#8217;s going to hurt you when it really counts, particularly when Dojo so easy to get started with?  Dojo&#8217;s Core has been designed from the ground up with APIs that encourage you to do things that are fast and keep you from doing things that are slow unless you really know what you&#8217;re doing. In some cases, we&#8217;ve made hard size-on-the-wire tradeoffs in order to keep actual app performance speedy. That hard engineering doesn&#8217;t show up in micro-benchmarks or single test release-over-release improvements or the &#8220;my toolkit is smaller&#8221; comparisons that some would prefer that web developers focus on. It&#8217;s easy to win rigged games, after all. It&#8217;s only when you see APIs composed together in real-world ways, across browsers, that you can start to see the real impact of a toolkit&#8217;s design philosophy. Dojo is designed to help you make things that are awesome for users, and that means they need to be <em>FAST</em>.</p>
<p>Other toolkits have released performance numbers of late, and most of them have been either reported badly or run without much rigor, so it&#8217;s exciting to see everyone finally pitching in to build end-to-end tests that show how library design decisions interact with real-world realities of browsers. The TaskSpeed tests have been designed to be both even-handed and reliable (no times below timer resolution, etc.). The <a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html">reporting page is also designed to make the results understandable</a> and put them in context. A lot of care has been taken to keep this benchmark honest. JavaScript developers have suffered at the hand of <a href="http://ajaxian.com/archives/querying-the-dom-on-the-sly">chart junk</a> for far too long.</p>
<p>I can&#8217;t do 1.3 justice in a single blog post, so I recommend that you check out these resources and then just dive in:</p>
<ul>
<li><a href="http://www.dojotoolkit.org/2009/03/31/dojo-1-3-now-available">Pete&#8217;s release announcement</a></li>
<li><a href="http://www.dojotoolkit.org/book/dojo-1-3-release-notes">The Official 1.3 Release Notes</a></li>
<li><a href="http://docs.dojocampus.org/">The new Documentation (at Dojo Campus)</a></li>
<li><a href="http://download.dojotoolkit.org/release-1.3.0/cheat.html">The new 1.3 Core Cheat Sheet</a></li>
<li><a href="http://code.google.com/p/plugd/">PlugD: An even easier way to get going with Dojo</a></li>
<li><a href="http://dante.dojotoolkit.org/taskspeed/">Run the TaskSpeed tests for yourself</a> then <a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html">see how the toolkits stack up</a> (hint: everything you thought you knew about JS library performance was probably wrong.)</li>
<li>Check out integrations for Dojo that you can probably drop right in to your workflow, no matter what stack you&#8217;re using: , <a href="http://www.springsource.org/webflow">Spring Web Flow (Java)</a>, <a href="http://code.google.com/p/dojango/">Dojango (Django/Python)</a>, <a href="http://code.google.com/p/d-rails/">DRails (Ruby/RoR)</a>, <a href="http://code.google.com/p/tatami/">Tatami (Java/GWT)</a>, <a href="http://framework.zend.com/">Zend (PHP)</a>, or <a href="http://dojomino.com/">Dojomino (Domino Server)</a>.</li>
</ul>
<p>Big thanks to the folks who tried out the betas and RC&#8217;s and helped make 1.3 solid.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/03/dojo-13-is-out/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Whoa.</title>
		<link>http://infrequently.org/2009/01/whoa/</link>
		<comments>http://infrequently.org/2009/01/whoa/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 23:38:00 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[dojo]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[palm]]></category>
		<category><![CDATA[pre]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=867</guid>
		<description><![CDATA[Via Dion, Palm&#8217;s new Mojo framework for the Pre is based on Dojo! As far as I know, it was a total surprise to the Dojo community (myself included). I can&#8217;t wait to get started writing apps for this thing and see what device APIs Palm has surfaced.]]></description>
			<content:encoded><![CDATA[<p><a href="http://ajaxian.com/archives/palm-mojo-uses-dojo-view-the-source">Via Dion</a>, Palm&#8217;s new <a href="http://developer.palm.com/">Mojo</a> framework for the <a href="http://www.palm.com/us/products/phones/pre/index.html">Pre</a> is based on Dojo!</p>
<p>As far as I know, it was a total surprise to the Dojo community (myself included). I can&#8217;t wait to get started writing apps for this thing and see what device APIs Palm has surfaced.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/01/whoa/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Census 2: More Than Just A Pretty Graph</title>
		<link>http://infrequently.org/2008/12/census-2-more-than-just-a-pretty-graph/</link>
		<comments>http://infrequently.org/2008/12/census-2-more-than-just-a-pretty-graph/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 15:59:07 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dhtml]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=849</guid>
		<description><![CDATA[Numbers without context are lies waiting to be repeated.]]></description>
			<content:encoded><![CDATA[<p>Benchmarks are hard, particularly for complex systems. As a result, the most hotly contested benchmarks tend not to be representative of what makes systems faster for real users. Does another 10% on <a href="http://www.tpc.org/default.asp">TPC</a> really matter to most web developers? And should we really pay any attention to how <em>any</em> JS VM does on <a href="http://shootout.alioth.debian.org/">synthetic language benchmarks</a>?</p>
<p>Maybe.</p>
<p>These things matter only in regards to how well they represent end-user workloads and how trustworthy their findings are. The first is much harder than the second, and end-to-end benchmarking is pretty much the only way to get there. As a result, sites like <a href="http://www.tomshardware.com/">Tom&#8217;s Hardware</a> focus on application-level benchmarks while still publishing &#8220;low level&#8221; numbers. Venerable test suites like <a href="http://en.wikipedia.org/wiki/SPECint">SPECint</a> have even moved toward running &#8220;full stack&#8221; style benchmarks which may emphasize a particular workload but are broad enough to capture the wider system effects which matter in the real world.</p>
<p>Marketing departments also like small, easily digestible, whole numbers. Saying something like &#8220;200% Faster!&#8221; sure sounds a lot better than &#8220;on a particular test which is part of a larger suite of tests, our system ran in X time vs. Y time for the competitor&#8221;. Both may be true, but the second statement gives you some context. Preferably even that statement would occur above an actual table of numbers or graphs. Numbers without context are lies waiting to be repeated.</p>
<p>With all of this said, <a href="http://www.jamesward.com/blog/">James Ward&#8217;s</a> <a href="http://jamesward.com/census">Census</a> benchmark makes a valiant stab at a full-stack test of data loading and rendering performance for RIA technologies. Last month <a href="http://dojotoolkit.org/2008/11/05/flash-flex-versus-open-web-ajax">Jared</a> dug further into the numbers and found the methodology wanting, but given some IP issues couldn&#8217;t patch the sources himself. Since I wasn&#8217;t encumbered in the same way I thought I might as well try my hand at it, but after hours of attempting to get the <a href="http://sourceforge.net/projects/flexapps">sources to build</a>, I finally gave up and decided to re-write the tests. The result is <a href="http://textterm.com/census.html">Census 2</a>.</p>
<p><a href="http://textterm.com/census.html"><img src="http://alex.dojotoolkit.org/wp-content/uploads/2008/12/census2_main_small.png" style="border: 0px;"/></a></p>
<p>There are several goals of this re-write:</p>
<ul>
<li><b>Fairness.</b> Tests need to be run multiple times for them to be representative in any way. Likewise, systems not being directly tested need to be factored out as much as possible. C2 does this by reducing the number of dependencies and running tests (at least) 5 times and discarding outliers before reporting an average. I&#8217;ve also worked to make sure that the tests put the best foot forward for all of the tested technologies.</li>
<li><b>Hackability.</b> Benchmarks like Census serve first as a way for decision makers to understand options but second as a way for developers to know how they&#8217;re doing. Making it trivial to add tests helps both audiences.</li>
<li><b>Portability.</b> The test suite should run nearly everywhere with a minimum of setup and fuss. This ensures that the largest numbers of people can benefit from the fairness and hackability of the tests.</li>
</ul>
<p>The results so far have been instructive. On smaller data sets HTML wins hands-down for time-to-render, even despite its disadvantage in over-the-wire size. For massive data sets, pagination saves even the most feature-packed of RIA Grids, allowing the Dojo Grid to best even XSLT and a more compact JSON syntax. Of similar interest is the delta between page cycle times on modern browsers vs their predecessors. Flex can have a relatively even performance curve over host browsers, but the difference between browsers today is simply stunning.</p>
<p>Given the lack of an out-of-the-box paginating data store for Flex, RIAs built on that stack seem beholden to either Adobe&#8217;s <a href="http://www.adobe.com/products/livecycle/dataservices/">LCDS licensing</a> or are left to build ad-hoc pagination into apps by hand to get reasonable performance for data-rich business applications. James Ward has already exchanged some mail with me on this topic and it&#8217;s my hope that we can show how to do pagination in Flex without needing LCDS in the near future. </p>
<p>The tests aren&#8217;t complete. There&#8217;s still work to do to get some of the SOAP and AMF tests working again. If you have ideas about how to get this done w/o introducing a gigantic harball of a Java toolchain, I&#8217;m all ears. Also on the TODO list is an <a href="http://code.google.com/appengine/">AppEngine app</a> for recording and analyzing test runs so that we can say something interesting about performance on various browsers. </p>
<p>Census 2 is very much <a href="http://code.google.com/p/census2/">an open source project</a> and so if you&#8217;d like to get your library or technology tested, please don&#8217;t hesitate to send me mail or, better yet, attach patches to the <a href="http://code.google.com/p/census2/issues/list">Bug Tracker</a>.</p>
<p><b>Update:</b> I failed to mention earlier that one of the largest changes in C2 vs. Census is that we report <em>full page cycle times</em>. Instead of reporting just the &#8220;internal&#8221; timings of an RIA which has been fully boostrapped, the full page times report the full time from page loading to when the output is responsive to user action. This keeps JavaScript frameworks (or even Flex) from omitting from the reports the price that users pay to download their (often sizable) infrastructure. There&#8217;s more work to do in reporting overall sizes and times (&#8220;bandwidth&#8221; numbers don&#8217;t report gzipped sizes, e.g.), but if you want the skinny on real performance, scroll down to the red bars. That&#8217;s where the action is.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/12/census-2-more-than-just-a-pretty-graph/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Joining Google</title>
		<link>http://infrequently.org/2008/11/joining-google/</link>
		<comments>http://infrequently.org/2008/11/joining-google/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 21:48:40 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[sitepen]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=840</guid>
		<description><![CDATA[Starting next month, I&#8217;ll be a Googler. To my great surprise, I&#8217;ve been at SitePen two and a half years. It has been nothing short of wonderful which may explain why it doesn&#8217;t feel like it has been that long. When I look back at what we&#8217;ve accomplished it&#8217;s also surprising that we&#8217;ve been able [...]]]></description>
			<content:encoded><![CDATA[<p>Starting next month, I&#8217;ll be a Googler.</p>
<p>To my great surprise, I&#8217;ve been at SitePen two and a half years. It has been nothing short of wonderful which may explain why it doesn&#8217;t feel like it has been that long. When I look back at what we&#8217;ve accomplished it&#8217;s also surprising that we&#8217;ve been able to do all if it in such a short timeframe. Between the huge client projects and re-building Dojo from the ground up, it has been busy bordering on nutty.</p>
<p>It already makes me sad to leave behind working with the SitePen crew, many of whom I helped to hire in and who I count among my closest friends. But I won&#8217;t be entirely gone. I&#8217;ll still be contributing to Dojo in my new role, if less frequently. Not that it&#8217;ll slow the project down any. Pete, Bill, Adam, and Tom have Dojo well in hand and have been driving things forward at a furious rate. Dojo has always been a team effort, and I&#8217;m excited about the improvements coming in 1.3. I&#8217;ve gotten a dis-proportionate amount of the credit over the years (and not enough of the blame), and as Dojo evolves from here it will continue to be because companies like <a href="http://sitepen.com">SitePen</a>, <a href="http://uxebu.com/">Uxebu</a>, <a href="http://aol.com">AOL</a>, and <a href="http://ibm.com">IBM</a> have all been able to contribute to make it happen and that leaders like Pete Higgins have stepped up to lead and teach and learn with the community. My deepest thanks go to Dylan and SitePen for having let me be a part of that process on a daily basis for the last couple of years.</p>
<p>So what could possibly pry me away from such a sweet, sweet gig at SitePen? </p>
<p>In a word, <a href="http://www.google.com/chrome">Chrome</a>.</p>
<p>Three years after many of my friends joined Google, the appeal of getting to fix the &#8220;web as platform&#8221; problem from the inside has finally proven irresistible. There&#8217;s much to do, and the WebKit platform seems like the best shot that we have (collectively) at forging a future that&#8217;s not just open, but also markedly better. At SitePen I&#8217;ve had the chance to make the web a better place through Dojo. At Google I&#8217;ll have a chance to do it from the browser itself.</p>
<p>To the friends I&#8217;m leaving, it was a privilege to work with you. To the friends I&#8217;m joining, thanks for your trust and faith.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/11/joining-google/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>delegate(), delegate(), delegate()</title>
		<link>http://infrequently.org/2008/10/delegate-delegate-delegate/</link>
		<comments>http://infrequently.org/2008/10/delegate-delegate-delegate/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 23:50:01 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[dhtml]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[boodman]]></category>
		<category><![CDATA[crockford]]></category>
		<category><![CDATA[delegate]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=786</guid>
		<description><![CDATA[My MBP batteries keep dying after about a year (each). I usually have 2 that I tote around with me, and each tends to be good for 1.5-2hrs of actual work. This means that I tend not to be able to work through a cross-country flight, and particularly not if I need a VM for [...]]]></description>
			<content:encoded><![CDATA[<p>My MBP batteries keep dying after about a year (each). I usually have 2 that I tote around with me, and each tends to be good for 1.5-2hrs of actual work. This means that I tend not to be able to work through a cross-country flight, and particularly not if I need a VM for anything (which is most of the time). I think that if Apple <em>does</em> <a href="http://www.macrumors.com/2008/10/09/apple-invites-media-to-notebook-event-october-14th/">rev the MBP&#8217;s on the 14th</a>, the things I&#8217;d pay for boil down to &#8220;more memory and much longer battery life&#8221;. The 5+ hour flight to <a href="http://ajaxexperience.techtarget.com/html/index.html">TAE</a> then provided a short window to do work in before I retreated to watching episodes of <a href="http://www.colbertnation.com/">The Colbert Report</a> on my phone. Knowing that i wouldn&#8217;t be able to work the whole time, I brought a copy of <a href="http://www.iam.unibe.ch/~scg/Archive/Papers/Duca06bTOPLASTraits.pdf">a great paper on Traits</a>. The paper got me thinking a lot about <code><a href="http://api.dojotoolkit.org/jsdoc/dojo/1.2/dojo.declare">dojo.declare()</a></code> and <code><a href="http://api.dojotoolkit.org/jsdoc/dojo/1.2/dojo.delegate">dojo.delegate()</a></code>.</p>
<p>Today, Dojo&#8217;s <code>delegate()</code> function is a straightforward implementation of the <a href="http://blog.youngpup.net/">Boodman</a>/<a href="http://www.crockford.com/">Crockford</a> delegation pattern which Doug calls &#8220;beget&#8221; and which ES 3.1 will refer to as <code>Object.create</code>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">dojo.<span style="color: #660066;">delegate</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// boodman/crockford delegation w/ cornford optimization</span>
    <span style="color: #003366; font-weight: bold;">function</span> TMP<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span> props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        TMP.<span style="color: #660066;">prototype</span> <span style="color: #339933;">=</span> obj<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> tmp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> TMP<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            dojo._mixin<span style="color: #009900;">&#40;</span>tmp<span style="color: #339933;">,</span> props<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> tmp<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Object</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This function returns a new object which looks to the old object for things it does not itself have. Imagine an object <code>foo</code> which contains pithy truisms:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> foo <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  science<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;rocks!&quot;</span><span style="color: #339933;">,</span>
  learning<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;is how you know you're alive&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We now want to promigulate our opinions, so we can delegate the responsibility of forming them:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> bar <span style="color: #339933;">=</span> dojo.<span style="color: #660066;">delegate</span><span style="color: #009900;">&#40;</span>foo<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
  testify<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    console.<span style="color: #660066;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;science &quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">science</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;and learning&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">learning</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, our <code>bar</code> object can change its mind independently of <code>foo</code>, but until it does, it&#8217;ll behave as though <code>foo</code>&#8216;s views are its own:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">bar.<span style="color: #660066;">testify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// outputs: &quot;science rocks and learning is how you know you're alive&quot;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// bar refines its opinion</span>
bar.<span style="color: #660066;">science</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;is a process&quot;</span><span style="color: #339933;">;</span> 
bar.<span style="color: #660066;">learning</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;requires humility&quot;</span><span style="color: #339933;">;</span>
foo.<span style="color: #660066;">science</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;rocks!&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// still true</span>
&nbsp;
bar.<span style="color: #660066;">testify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// outputs: &quot;science is a process and learning requires humility&quot;</span></pre></div></div>

<p>But what about when the chain gets deeper? The fact that <code>bar</code> can&#8217;t &#8220;see&#8221; <code>foo</code>&#8216;s values via <code>this</code> isn&#8217;t much of a problem when the hierarchy isn&#8217;t very long, but if you&#8217;re specializing a behavior or complex interaction, making it possible to get at the parent&#8217;s values for properties and methods becomes more pressing.</p>
<p>Neil has previously <a href="http://www.sitepen.com/blog/2008/03/16/are-you-sure-you-should-be-subclassing-that/">written about lightweight subclassing</a>, but for as good as it its, it doesn&#8217;t get us all the way there either. In regular OO-style languages, the inheritance system gives you an out via a &#8220;super&#8221; keyword or convention. This type of property shadowing-with-exceptions is a huge boon to composition in class-based languages, but it&#8217;s not the whole story. Indeed, the Traits paper was all about the shortcomings of this special-purpose mechanism. What we want for both long delegation chains and long inheritance hierarchies is a more general system; in essence a way to say &#8220;I want to control how things are shadowed and which ones an item points at in each level of the hierarchy&#8221;.</p>
<p>What if we could make <code>delegate()</code> savvy of this type of indirection? Here&#8217;s my quick prototype:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">delegate <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> tobj <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> TMP <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span> props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        TMP.<span style="color: #660066;">prototype</span> <span style="color: #339933;">=</span> obj<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> tmp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> TMP<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> remaps <span style="color: #339933;">=</span> props<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>remaps<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">delete</span> props<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #000066; font-weight: bold;">in</span> remaps<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>tobj<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> undefined <span style="color: #339933;">||</span> tobj<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> remaps<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>remaps<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                            <span style="color: #006600; font-style: italic;">// support hiding via null assignment</span>
                            tmp<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
                            <span style="color: #006600; font-style: italic;">// alias the local version away</span>
                            tmp<span style="color: #009900;">&#91;</span>remaps<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> obj<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            dojo.<span style="color: #660066;">mixin</span><span style="color: #009900;">&#40;</span>tmp<span style="color: #339933;">,</span> props<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> tmp<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Object</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This new version of <code>delegate()</code> accepts a specially named &#8220;->&#8221; property in the list of items to add to the destination object. Items in this list can either &#8220;shadow null&#8221; (hide entirely) the parent&#8217;s property or can provide a new name for it, assuming of course that the new object will also have a property of that name. Here&#8217;s a quick example of &#8220;->&#8221; at work with our previous example. This time, <code>foo</code> also has a &#8220;testify&#8221; method that we&#8217;d like <code>bar</code> to be able to control without having to copy the implementation:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> foo <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    science<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;rocks!&quot;</span><span style="color: #339933;">,</span>
    learning<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;is how you know you're alive&quot;</span><span style="color: #339933;">,</span>
    testify<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        console.<span style="color: #660066;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;science &quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">science</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;and learning&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">learning</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> bar <span style="color: #339933;">=</span> delegate<span style="color: #009900;">&#40;</span>foo<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;testify&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;grampsSays&quot;</span> <span style="color: #006600; font-style: italic;">// maps foo's &quot;testify&quot; to bar's &quot;grampsSays&quot;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    testify<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">science</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">learning</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">grampsSays</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// call the re-named &quot;testify&quot;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
            console.<span style="color: #660066;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;this object is strikingly ignorant&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
bar.<span style="color: #660066;">testify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// outputs: &quot;science rocks and learning is how you know you're alive&quot;</span>
bar.<span style="color: #660066;">science</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
bar.<span style="color: #660066;">testify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// outputs: &quot;this object is strikingly ignorant&quot;</span></pre></div></div>

<h4>That New Object Smell</h4>
<p>The last missing piece of the hierarchy pie here is that there&#8217;s no initializer for the objects which come from a delegation. A simple addition of some property detection code to look for an initializer can easily handle that:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">delegate <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> tobj <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> TMP <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span> props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// boodman/crockford delegation w/ cornford optimization. </span>
&nbsp;
        TMP.<span style="color: #660066;">prototype</span> <span style="color: #339933;">=</span> obj<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> tmp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> TMP<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> remaps <span style="color: #339933;">=</span> props<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>remaps<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">delete</span> props<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">// like dojo.mixin(), except w/o key/key mapping</span>
                <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #000066; font-weight: bold;">in</span> remaps<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #006600; font-style: italic;">// &quot;safe&quot; copy properties</span>
                    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>tobj<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> undefined <span style="color: #339933;">||</span> tobj<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> remaps<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>remaps<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                            <span style="color: #006600; font-style: italic;">// support hiding via null assignment</span>
                            tmp<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
                            <span style="color: #006600; font-style: italic;">// alias the local version away</span>
                            tmp<span style="color: #009900;">&#91;</span>remaps<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> obj<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            dojo.<span style="color: #660066;">mixin</span><span style="color: #009900;">&#40;</span>tmp<span style="color: #339933;">,</span> props<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// support for &quot;constructor&quot; functions. The name &quot;init&quot; is arbitrary.</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> tmp<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;init&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;function&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            tmp.<span style="color: #660066;">init</span>.<span style="color: #660066;">call</span><span style="color: #009900;">&#40;</span>tmp<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">return</span> tmp<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Object</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And there we have it. A style of delegation that easily supports both Trait-like name aliasing (and null shadowing) as well as internal initializers. Since our upgraded <code>delegate</code> can handle nulling out a parent&#8217;s value for a property, we also have a straightforward way to prevent parent initializers from being called (or being called/chained &#8211; at our discretion &#8211; by a new name):</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> foo <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    science<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;rocks!&quot;</span><span style="color: #339933;">,</span>
    learning<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;is how you know you're alive&quot;</span><span style="color: #339933;">,</span>
    testify<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        console.<span style="color: #660066;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;science &quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">science</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;and learning&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">learning</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> bar <span style="color: #339933;">=</span> delegate<span style="color: #009900;">&#40;</span>foo<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    init<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">testify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// outputs: &quot;science rocks and learning is how you know you're alive&quot;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> baz <span style="color: #339933;">=</span> delegate<span style="color: #009900;">&#40;</span>bar<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// map away the parent's constructor</span>
    <span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;init&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;superInit&quot;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #006600; font-style: italic;">// provide our own constructor</span>
    init<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        console.<span style="color: #660066;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;howdy!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">superInit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// call the super-object ctor</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// outputs: &quot;howdy&quot;, &quot;science rocks and learning is how you know you're alive&quot;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> thud <span style="color: #339933;">=</span> delegate<span style="color: #009900;">&#40;</span>baz<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #3366CC;">&quot;-&gt;&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> <span style="color: #3366CC;">&quot;init&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// hide the parent ctor</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// outputs: nothing</span></pre></div></div>

<p>This form of <code>delegate</code> is likely to appear in Dojo 1.3 along with similar improvements to <code>dojo.declare()</code> to help alleviate the composition problems associated with using complex sets of mixins.</p>
<p><b>Update</b>: corrected the null-out branch and updated the text with Doug&#8217;s note that beget/delegate will be called Object.create() in 3.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/10/delegate-delegate-delegate/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>ZendCon Notes</title>
		<link>http://infrequently.org/2008/09/zendcon-notes/</link>
		<comments>http://infrequently.org/2008/09/zendcon-notes/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 18:35:06 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[sitepen]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zendcon]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=778</guid>
		<description><![CDATA[I gave a talk on Dojo Wednesday at ZendCon, and when I walked into the room for the talk, there was some disorder as the conference center staff were taking out the tables to fit more chairs in. Even with the extra space, the room was totally packed, thanks in large part to the amazing [...]]]></description>
			<content:encoded><![CDATA[<p>I gave a talk on Dojo Wednesday at <a href="http://www.zendcon.com/ZendCon08/">ZendCon</a>, and when I walked into the room for the talk, there was some disorder as the conference center staff were taking out the tables to fit more chairs in. Even with the extra space, the room was totally packed, thanks in large part to the amazing Dojo integration work that the Zend team has done. </p>
<p>As of <a href="http://framework.zend.com/">Zend Framework 1.6</a>, you can include some trivial code inside your ZF views to pull in Dojo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ? 
	<span style="color: #666666; font-style: italic;">// setup required dojo elements:</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dojo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #339933;">-&gt;</span><span style="color: #004000;">enable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dojo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Once enabled on your page, ZF 1.6 also includes a full set of helpers to let you set up Dijit components from PHP. <a href="http://framework.zend.com/manual/en/zend.dojo.html">The excellent ZF docs has the full story</a>. Perhaps most exciting from my perspective, though, is how simple ZF makes getting up-and-running with Dojo and how nicely it ties in with custom builds and CDN-hosted versions of Dojo as well. <a href="http://www.zend.com/en/resources/webinars/framework">Matthew Weier O&#8217;Phinney and Will Sinclair</a> recently did a screencast that walks through a lot of these options. If you&#8217;re considering ZF+Dojo, I strongly recommend you check it out.</p>
<p>The talk I gave on Wed was mostly focused on Dojo and the reasons we built it in the layered way that we have and how you can choose to use Dojo at whatever level of abstraction feels right for your app. Slides are here (5.1MB, PDF):</p>
<p><a href="/08/ZendCon/PowerOfDojo.pdf"><br />
<img src="/08/ZendCon/PowerOfDojo.001.png" style="border: none; width: 350px;"/><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/09/zendcon-notes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Importance Of Chrome</title>
		<link>http://infrequently.org/2008/09/the-importance-of-chrome/</link>
		<comments>http://infrequently.org/2008/09/the-importance-of-chrome/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:28:44 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[dhtml]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[strategy]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=747</guid>
		<description><![CDATA[The rumors seem to have been true&#8230;the gBrowser is real. And it looks like it will simply be awesome. To my friends who have been toiling on it in deep secrecy for so very long, congratulations. Yes, yes, more to do, blah blah&#8230;screw that. You shipped! Huzzah! So what does Chrome mean for those of [...]]]></description>
			<content:encoded><![CDATA[<p>The rumors seem to have been true&#8230;<a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html">the gBrowser is real</a>. And it looks like it will simply be awesome. To my friends who have been toiling on it in deep secrecy for so very long, congratulations. Yes, yes, more to do, blah blah&#8230;screw that. You shipped! Huzzah!</p>
<p>So what does Chrome mean for those of us who aren&#8217;t breaking out the champagne? Well, first, it&#8217;s the second sign (after <a href="http://gears.google.com/">Gears</a> and YBP (<a href="http://alex.dojotoolkit.org/2008/06/gears-de-brands-2/">har!</a>)) that the content authors are taking back the web from the &#8220;browser guys&#8221;. I&#8217;ve been fascinated for the last 6 months or so by the strategic mis-alignment which results when both the browsing and authoring experience in the hands of organizations only care about one but not the other. Mozilla gets paid by search-box revenue and users download it because it&#8217;s better for browsing, therefore Mozilla is incented to <a href="http://www.adaptivepath.com/aurora/">build new ways to browse</a>, but their investments in content are somewhat mis-aligned (and, frankly, <a href="http://labs.mozilla.com/">it shows</a>). Google and Yahoo, on the other hand, are critically dependent on the content getting better, so they produce plugins to augment HTML in un-intrusive ways. Chrome crosses over into the browser business <em>from the perspective of content</em>, and it also shows, albeit in a good-ish way. I guess we&#8217;ll need to wait and see how browsing-oriented Chrome gets (e.g., will it sprout an extensions platform &ndash; ala Firefox &ndash; or will the propsect of an ad-blocking plugin for the Google browser make that proposal D.O.A.?).</p>
<p>Regardless of how Chrome evolves as a product, the important question now is: how will it be distributed? The obviously non-evil thing to do is to say &#8220;look, it&#8217;s great, it&#8217;s free&#8221; and hope that the world discovers it on its own thanks to word-of-mouth and/or leverage of the Google brand. Given that Chrome delivers new awesome things which are end-user-visible (some &#8220;end-user-awesome&#8221;, if you will), there&#8217;s some real chance that Chrome can get to roughly Firefox level market-share without breaking too much of a sweat. Not that Firefox&#8217;s market share is anything to really covet, given that MoFo/MoCo have been toiling at it for a decade now. To get real, honest-to-god leverage out of this process, Chrome is going to need something like 60+% market share, and that means changing ingrained user habits. I put the probability of that happening without distribution channel love at roughly bupkis.</p>
<p>Microsoft killed Netscape by bundling the browser with the OS. Apple is <a href="http://marketshare.hitslink.com/report.aspx?sample=15&#038;qprid=22&#038;qpdt=1&#038;qpct=5&#038;qptimeframe=M&#038;qpsp=101&#038;qpnp=12&#038;qprid2=3&#038;qpcustom2=Firefox+3.0">making inroads by bundling</a>. Firefox is even <a href="http://marketshare.hitslink.com/report.aspx?sample=15&#038;qprid=22&#038;qpdt=1&#038;qpct=5&#038;qptimeframe=M&#038;qpsp=101&#038;qpnp=12&#038;qprid2=3&#038;qpcustom2=Firefox+3.0#">getting aggressive</a>. So where does this leave &#8220;don&#8217;t be evil&#8221;? Given the <a href="http://weblogs.java.net/blog/kgh/archive/2005/10/java_se_and_the.html">toolbar promotional deals</a> which Google has cut in the past, I think there&#8217;s some organizational capacity inside the Goog to use the distribution channels they&#8217;ve already created as a way of getting to critical mass. What I don&#8217;t see, though, is a view of how to bring the mission of Gears into alignment with Chrome (or vice versa). They&#8217;re both important, but Chrome is a long-term bet while Gears is the near-future solution. They are not in opposition, but their strategies for gaining leverage over the problems facing content authors are very different.</p>
<p>We need what Gears can offer to every browser <em>right now</em> while Chrome dukes it out for market share on the browsing experience merits. Hopefully, if nothing else, the Chrome installer will add Gears to other browsers on the system that users install Chrome to. Even if they don&#8217;t pick the googly experience for browsing day-to-day, perhaps Chrome can still serve to give new tools to the content-author side of the house. Other browser vendors won&#8217;t do such a thing since they win or loose on an exclusive &#8220;I must replace the other guy&#8221; basis. Here, Google (and by &#8220;Google&#8221;, I mean &#8220;the open web&#8221;) wins either way. Hopefully Google&#8217;s interest in making the content experience better trumps the &#8220;we&#8217;re all browser guys now&#8221; instinct in this case.</p>
<p>We&#8217;ll find out tomorrow, I guess. Here&#8217;s to hoping.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/09/the-importance-of-chrome/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Dojo&#8217;s Query System: No, Really, It&#8217;s That Fast</title>
		<link>http://infrequently.org/2008/08/dojos-query-system-no-really-its-that-fast/</link>
		<comments>http://infrequently.org/2008/08/dojos-query-system-no-really-its-that-fast/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 23:51:59 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=743</guid>
		<description><![CDATA[As outlined by JQuery lead John Resig in this post, it&#8217;s hard not to notice how much Dojo&#8217;s query engine stomps on the the competition on current browsers. Dojo will load even quicker when we&#8217;re able to remove the XPath branch in the query engine which is currently only being kept on life support for [...]]]></description>
			<content:encoded><![CDATA[<p>As outlined by JQuery lead John Resig <a href="http://ejohn.org/blog/queryselectorall-in-firefox-31/">in this post</a>, it&#8217;s hard not to notice how much Dojo&#8217;s query engine stomps on the the competition on current browsers. Dojo will load even quicker when we&#8217;re able to remove the XPath branch in the query engine which is currently only being kept on life support for the benefit of Firefox.  The rest of Dojo has been designed with the same eye to real-world performance factors in mind, hence the build and package systems which help you <a href="http://video.yahoo.com/watch/1040890/3880720">implement Steve Souders&#8217; performance recommendations</a> gradually, without major code changes.</p>
<p>Regardless of how good it feels to see our numbers recognized for all the hard work that has gone into the Dojo design, I think it&#8217;s also good to keep them in perspective. Most of the available query engines are &#8220;fast enough&#8221; &ndash; although there&#8217;s really no reason why your query engine of choice should be twice as slow as Dojo&#8217;s, given that ours is <a href="http://almaer.com/blog/being-open-is-hard-as-we-have-seen-this-week">100-point Open Source</a>. Having a native implementation is nice, but the primary benefit now is in reducing the number of bytes we need to send on the wire, not in actual query speed advantages. Making queries faster isn&#8217;t in the critical path for improving the real-world performance of any Dojo apps I know of, and I bet the same is true for JQuery users. Reducing the size of the libraries, on the other hand, is still important. Now that we&#8217;re all fast enough, it&#8217;s time that we stopped beating on this particular drum lest we lose the plot and the JavaScript community continue to subject itself to endless rounds of benchmarketing.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/08/dojos-query-system-no-really-its-that-fast/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Chandler 1.0!</title>
		<link>http://infrequently.org/2008/08/chandler-10/</link>
		<comments>http://infrequently.org/2008/08/chandler-10/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 17:59:26 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=727</guid>
		<description><![CDATA[Somehow I missed this last week, but OSAF&#8217;s Chandler super-PIM just went 1.0. It&#8217;s been a long time in coming, and the result isn&#8217;t what I had at all expected. Instead of being an &#8220;email client++&#8221;, Chandler 1.0 is a calendar and task management tool that happens to be super-savvy about talking to your existing [...]]]></description>
			<content:encoded><![CDATA[<p>Somehow I missed this last week, but OSAF&#8217;s <a href="http://chandlerproject.org">Chandler</a> super-PIM just <a href="http://blog.chandlerproject.org/2008/08/08/chandler-10/">went 1.0</a>. It&#8217;s been a long time in coming, and the result isn&#8217;t what I had at all expected. Instead of being an &#8220;email client++&#8221;, Chandler 1.0 is a calendar and task management tool that happens to be super-savvy about talking to your existing IMAP folders and lets you share and coordinate via CalDAV. This is fundamentally different from <a href="http://culturedcode.com/things/">Things</a> in that it also has enough of the &#8220;guts&#8221; of a real PIM to allow scheduling and coordination on tasks to be an integral part of the experience. Fundamentally it&#8217;s &#8220;us&#8221; oriented and not &#8220;me&#8221; oriented and I&#8217;m excited to see what organizations use it for and what kinds of organizations discover its value. </p>
<p>The Chandler Hub also strikes me as a gem hidden in plain sight. Not only is it a great way to share parts of your schedule with others, it&#8217;s an amazingly complete Dojo-based, Open Source UI for getting it all done, too. <a href="http://chandlerproject.org/Developers/DownloadChandlerServer">You can run your own Cosmo server</a> (the code that runs Chandler Hub) inside of your department or organization but more than that, <a href="http://chandlerproject.org/Developers/ChandlerServerSource">you can get the source</a>. If you know Java (or employ someone that does), the Cosmo server is perhaps the easiest-to-hack-on option for an organization needing a flexible, lightweight task and team management option. Given that every organization I&#8217;ve ever worked for has struggled with <em>exactly</em> this type of coordination, the availability of source code here is probably going to beget some amazing integrations with bug trackers and the other project and task management systems already rely on. In some ways, despite being almost completely different in scope, Chandler Hub and <a href="http://pulse.plaxo.com">Plaxo&#8217;s kick-butt online features</a> are both brining a level of visibility to different types of activities that cry out for better and deeper integrations with the tools that get used every day to &#8220;do the work&#8221; or track it in other ways. A few lightweight bridges to MS Project and/or Trac/Redmine would make Cosmo jet fuel for team visibility. I can&#8217;t wait.</p>
<p>The Chandler team also told me last week that they&#8217;re hard at work on a re-architecture of their python-based desktop client in order improve the performance and startup time and to make the whole system more hackable. Given that the desktop and web clients can speak to the same Cosmo server back-end (which can federate data out to lots of other places to boot), this seems like a promising path forward as the team completes a transition to a more traditional OSS distributed-development approach. Truth be told, I probably won&#8217;t give up Thinks for Chandler desktop until performance does improve, but I&#8217;m sure gonna be tying my calendars together with Jennifer&#8217;s via Chandler Hub ASAP. </p>
<p>Congrats again to the Chandler (and Cosmo and Hub) team(s)!</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/08/chandler-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Transition</title>
		<link>http://infrequently.org/2008/08/transition/</link>
		<comments>http://infrequently.org/2008/08/transition/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 21:29:21 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[Dojo Foundaton]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=713</guid>
		<description><![CDATA[Two days ago I dusted off the rarely-used voting procedure for Dojo Foundation projects in order to kick off a transition that I&#8217;m very excited about: as of this afternoon, the committers of the Dojo project have elected Peter Higgins the new Project Lead for the toolkit project. I&#8217;ve had the pleasure of working with [...]]]></description>
			<content:encoded><![CDATA[<p>Two days ago I <a href="http://turtle.dojotoolkit.org/pipermail/dojo-contributors/2008-August/009571.html">dusted off the rarely-used voting procedure</a> for Dojo Foundation projects in order to kick off a transition that I&#8217;m very excited about: as of this afternoon, the committers of the Dojo project have <a href="http://turtle.dojotoolkit.org/pipermail/dojo-contributors/2008-August/009596.html">elected</a> <a href="http://higginsforpresident.net/">Peter Higgins</a> the new Project Lead for the toolkit project.</p>
<p>I&#8217;ve had the pleasure of working with Peter both in the Dojo project and at <a href="https://www.sitepen.com/">SitePen</a> and his energy and enthusiasm for making Dojo better and helping designers and developers work better together is infectious. </p>
<p>For anyone not familiar with Peter&#8217;s work, he&#8217;s been instrumental in the creation of the amazing <a href="http://dojocampus.org/">Dojo Campus</a> website (along with the <a href="http://blog.uxebu.com/">Uxebu chaps</a>) as well as being primary author of many DojoX components. His work in shepherding new contributors through the contributor to committer process is nearly legendary inside the project, and Peter has been a one-man outreach and support machine via the <a href="http://dojotoolkit.org/blog">Dojo blog</a> and his endless patience on the <a href="http://dojotoolkit.org/forum">forums</a> and IRC (#dojo on irc.freenode.net). I couldn&#8217;t be happier about where Dojo is headed under his direction.</p>
<p>There have already been some recurring questions about this transition amongst the committers and <a href="http://ajaxian.com/archives/open-web-podcast-episode-1-html-5-news-web-workers-w3c-selectors-and-dojo-happenings">on today&#8217;s Open Web podcast</a>, so let me quickly recap them here:</p>
<h3>Q: Will you still be involved in Dojo?</h3>
<p>Absolutely! I&#8217;m excited that Pete is taking on the figurehead and &#8220;vision thing&#8221; duties which is a role that he&#8217;s naturally suited to. Part of this transition is about me wanting more time to focus on experimental and edgy stuff that can make a huge difference in how we work with the web and I have no doubt that Peter is the right guy to help us grow the truly open Dojo community even further. He absolutely gets the importance of a truly open community, the need to be conservative about where IP comes from and meet our promises of backwards-compatibility, and how Dojo can make big changes in the lives of application developers and designers. I&#8217;m grateful to be have the opportunity to continue working with him on Dojo and will continue to do so in whatever capacity Peter deems appropriate.</p>
<h3>Q: Does this change your role at the Foundation?</h3>
<p>Nope. I&#8217;m still serving as President of the Dojo Foundation. This transition will allow me to also focus more time on ensuring that the Foundation is running well, that a new Board is elected soon, and that the Foundation&#8217;s other projects succeed on their own terms. The Foundation has always been about more than just giving Dojo a home, and we&#8217;re now looking to expand the umbrella of the Foundation to help nurture other JavaScript and Open Web projects more than ever.</p>
<h3>Q: Will you still be doing talks on Dojo?</h3>
<p>Yep, I&#8217;ll still be out there advocating the Dojo case, but you can expect to see Peter doing more of that over time as well. If you&#8217;re planning a conference and are looking for a cogent person to talk about Dojo, Peter is now your go-to guy. I&#8217;ve enjoyed having the opportunity to think and <a href="http://alex.dojotoolkit.org/?p=675">talk about where the Open Web is headed</a>, so I&#8217;ll also be doing a lot more of that. There are lots of meta-issues that this transition will let me work harder on, so expect more from me there.</p>
<p>My hat&#8217;s off to the Dojo community and Peter in particular. The work that has gone into 1.2 and will land in 1.3 and beyond under his direction really is changing the way we view what the web can and should be used for.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/08/transition/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>OSCON &#8217;08</title>
		<link>http://infrequently.org/2008/07/oscon-08/</link>
		<comments>http://infrequently.org/2008/07/oscon-08/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 01:31:39 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[openweb]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=693</guid>
		<description><![CDATA[I&#8217;m leaving tomorrow for my yearly trek to Portland for OSCON. If you&#8217;re going, don&#8217;t hesitate to drop me a line if you want to catch up or RSVP for the Dojo meetup/dinner on Wed evening. Speaking as a member of the OSCON program committee, I&#8217;m very happy about the quality of the talks in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m leaving tomorrow for my yearly trek to Portland for <a href="http://en.oreilly.com/oscon2008/public/content/home">OSCON</a>. If you&#8217;re going, don&#8217;t hesitate to drop me a line if you want to catch up or <a href="http://dojotoolkit.org/2008/07/17/ddd-4-5-portland-oregon">RSVP for the Dojo meetup/dinner on Wed evening</a>.</p>
<p>Speaking as a member of the OSCON program committee, I&#8217;m <em>very</em> happy about the quality of the talks in the web-ish tracks this year. There&#8217;s even a Dojo talk &ndash; even though for the first time in a long while, I won&#8217;t be giving any talks. The <a href="http://en.oreilly.com/oscon2008/public/schedule/speaker/6606">inimitable Matthew Russell</a>, author of ORA&#8217;s <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2FDojo-Definitive-Guide-Matthew-Russell%2Fdp%2F0596516487%2F&#038;tag=oreonbl-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=9325">Dojo: TDG</a> will be giving an awesome talk on 2D drawing with Dojo&#8217;s GFX system. I know he&#8217;s got some awesome demos worked up, so I can&#8217;t wait to see the talk. <a href="http://en.oreilly.com/oscon2008/public/schedule/speaker/6580">Gavin Doughtie</a>, occasional contributor to the GFX system, is also giving several talks that you&#8217;ll find me in. Should be a lot of fun.</p>
<p>On a more macro scale, though, I&#8217;ve started to become concerned that &#8220;Open Source&#8221; as a brand has lost its way. Those <a href="http://opensource.org/">who would speak for Open Source</a> have focused narrowly on licensing and have largely ignored the other social processes and artifacts that define what it means to contribute to OSS projects and how those artifacts lead to success or failure of projects, and therefore, of the movement such as it is. There&#8217;s a huge disconnect between what the letter of the Open Source law dictates (the licenses) and the social and process constraints that are required to build high-quality, trustable communities that ensure <a href="http://almaer.com/blog/being-open-is-hard-as-we-have-seen-this-week">100 point</a> OSS products, and many businesses have struck on these differences as a way to use the Open Source brand to imply or insinuate that users should trust their products more than is warranted. OSI&#8217;s failure to address this brand erosion has had some troubling effects in the small JavaScript corner of the OSS world of late, and I know we&#8217;re not alone. OSI has also proven completely impotent in preventing license proliferation, further eroding the Open Source brand. There are, of course, lots of folks who are also concerned about these thing, and so I&#8217;m excited to see <a href="http://en.oreilly.com/oscon2008/public/schedule/detail/4876">David Recordon</a> (of OpenID, etc. fame) giving a talk which looks to talk about some of the community aspects. I tend to blow off &#8220;community&#8221; talks at conferences, but given David&#8217;s use of the phrase &#8220;Open Web&#8221; and his unique perspective, I&#8217;ll be interested to see what he says. I&#8217;ll also be curious to see if and how any of this is discussed at the FLOSSCON meeting of OSS Foundation leaders tomorrow and Sunday.</p>
<p>If you&#8217;ll be in Portland next week, don&#8217;t hesitate to join us for the <code>dojo.dinner()</code> on Wed. I&#8217;m looking forward to seeing everyone again and talking though the issues. Should be a great time.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/07/oscon-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dojo Developer Day Boston, Sept. 28-29</title>
		<link>http://infrequently.org/2008/07/dojo-developer-day-boston-sept-28-29/</link>
		<comments>http://infrequently.org/2008/07/dojo-developer-day-boston-sept-28-29/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 00:13:42 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=688</guid>
		<description><![CDATA[As Dylan just posted over on the official Dojo blog, we&#8217;re having our next bi-annual Dojo Developer Day event in Boston just prior to the Ajax Experience conference. Like previous DDD events, the first day will be somewhat contributor-oriented, and many decisions about the direction of the project are likely to get made there. The [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://dojotoolkit.org/2008/07/10/dojo-developer-day-boston">Dylan just posted over on the official Dojo blog</a>, we&#8217;re having our next bi-annual Dojo Developer Day event in Boston just prior to the <a href="http://ajaxexperience.techtarget.com/html/index.html">Ajax Experience</a> conference.</p>
<p>Like previous DDD events, the first day will be somewhat contributor-oriented, and many decisions about the direction of the project are likely to get made there. The Monday event will be community focused with tutorials, presentations of new work, time to present your Dojo-based apps, and opportunities for Q&#038;A with the developers who are hacking on the features you use every day.</p>
<p>Sound interesting? <b><a href="http://www.surveymonkey.com/s.aspx?sm=JfFSgboglZ_2bCuySWr49SPw_3d_3d">Sign up!</a></b></p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/07/dojo-developer-day-boston-sept-28-29/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Lovely Box For Your Toolkit</title>
		<link>http://infrequently.org/2008/07/a-lovely-box-for-your-toolkit/</link>
		<comments>http://infrequently.org/2008/07/a-lovely-box-for-your-toolkit/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 18:15:13 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sitepen]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=686</guid>
		<description><![CDATA[I&#8217;m incredibly excited about the SitePen Dojo Toolbox AIR app that just launched. I&#8217;ve been using early versions for a couple of weeks now, and in that time it has earned a privileged place on my desktop. Being able to make local builds without delving to the command line is something that I&#8217;ve wanted to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sitepen.com/labs/toolbox/"><img src="http://www.sitepen.com/blog/wp-content/uploads/2008/07/launcherexpanded.png" style="width: 70px; padding-right: 15px; border: none;" align="left" /></a></p>
<p>I&#8217;m incredibly excited about the <a href="http://www.sitepen.com/blog/2008/07/08/dojo-toolbox-first-look/">SitePen Dojo Toolbox</a> <a href="http://www.adobe.com/products/air/">AIR</a> app that just launched. I&#8217;ve been using early versions for a couple of weeks now, and in that time it has earned a privileged place on my desktop. Being able to make local builds without delving to the command line is something that I&#8217;ve wanted to be able to show new Dojo users for <em>years</em> and this tool finally makes it easy. There&#8217;s more work to do around configuring the profiles themselves, but the new tool demystifies many of the build configuration options significantly. Having a searchable API viewer available is also a godsend. Huge props to the team that put it together!</p>
<p><b>Edit:</b> I forgot to note one of my favorite parts of the project, namely that because the Dojo build system is written in JavaScript (thanks to <a href="http://tagneto.blogspot.com/">James Burke</a>&#8216;s awesome work), the build system in the Toolbox doesn&#8217;t require Java. Instead, SitePen was able to port the few Rhino dependencies in the build tool to work with the native JavaScript engine in AIR. It&#8217;s a minor thing, but it speaks to the excellent engineering behind Dojo&#8217;s tooling and the power of having actual web-native technologies inside a desktop app.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2008/07/a-lovely-box-for-your-toolkit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

