<?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>Yahoo! User Interface Blog (YUIBlog) &#187; YUI Implementations</title>
	<atom:link href="http://www.yuiblog.com/blog/index.php/category/yui-implementations/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuiblog.com/blog</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Tue, 14 Feb 2012 00:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>YUI Theater &#8212; Ryan Cannon: &#8220;There is no off-season: NFL.com&#8217;s move to YUI&#8221; (42 min.)</title>
		<link>http://www.yuiblog.com/blog/2012/01/17/video-yuiconf2011-rcannon/</link>
		<comments>http://www.yuiblog.com/blog/2012/01/17/video-yuiconf2011-rcannon/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 18:57:15 +0000</pubDate>
		<dc:creator>Ryan Grove</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[YUI Implementations]]></category>
		<category><![CDATA[YUI Theater]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/2012/01/17/</guid>
		<description><![CDATA[NFL.com&#8217;s Ryan Cannon (@rcanine) joined us at YUIConf 2011 to share the story of why NFL.com chose YUI over jQuery, how they migrated a large codebase from Prototype to YUI 3 on a tight schedule, and how they use YUI to create websites and mobile apps for one of the world&#8217;s most popular sports leagues. [...]]]></description>
			<content:encoded><![CDATA[<p>
NFL.com&#8217;s Ryan Cannon (<a href="http://twitter.com/rcanine">@rcanine</a>) joined us at YUIConf 2011 to share the story of why <a href="http://www.nfl.com/">NFL.com</a> chose YUI over jQuery, how they migrated a large codebase from Prototype to YUI 3 on a tight schedule, and how they use YUI to create websites and mobile apps for one of the world&#8217;s most popular sports leagues.
</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/x0OuYNlnCZ8?hd=1" frameborder="0" allowfullscreen></iframe></p>
<h3>Links</h3>
<ul>
<li><a href="http://www.youtube.com/watch?v=x0OuYNlnCZ8&#038;hd=1">View in HD on YouTube</a></li>
<li><a href="http://ryancannon.com/yuiconf2011/">Slides</a></li>
<li><a href="http://www.youtube.com/playlist?list=PLF49A40DA7A11F08A">Full YUIConf 2011 Playlist on YouTube</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2012/01/17/video-yuiconf2011-rcannon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI Stories</title>
		<link>http://www.yuiblog.com/blog/2011/11/10/yuiconf-yui-stories/</link>
		<comments>http://www.yuiblog.com/blog/2011/11/10/yuiconf-yui-stories/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 21:07:06 +0000</pubDate>
		<dc:creator>Ryan Grove</dc:creator>
				<category><![CDATA[YUI Implementations]]></category>
		<category><![CDATA[YUI Theater]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/2011/11/10/</guid>
		<description><![CDATA[At YUIConf 2011 last week, we set up a video camera and invited attendees to tell us how they use YUI and why they chose it for their projects. We were thrilled to hear their stories, and we&#8217;d love to hear yours as well! After checking out the video, leave a comment and tell us [...]]]></description>
			<content:encoded><![CDATA[<p>
At YUIConf 2011 last week, we set up a video camera and invited attendees to tell us how they use YUI and why they chose it for their projects. We were thrilled to hear their stories, and we&#8217;d love to hear yours as well! After checking out <a href="http://youtu.be/F-krPD9fRsk?hd=1">the video</a>, leave a comment and tell us how you use YUI.
</p>
<p><iframe width="549" height="335" src="http://www.youtube-nocookie.com/embed/F-krPD9fRsk?hd=1" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2011/11/10/yuiconf-yui-stories/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Loader Usage at Quorus</title>
		<link>http://www.yuiblog.com/blog/2011/03/24/loader-usage-at-quorus/</link>
		<comments>http://www.yuiblog.com/blog/2011/03/24/loader-usage-at-quorus/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 16:49:38 +0000</pubDate>
		<dc:creator>Peter Abrahamsen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/2011/03/22/</guid>
		<description><![CDATA[Today, I&#8217;d like to talk about YUI Loader and how we at Quorus, Inc., use it to provide third-party websites with new features on demand. The code we write powers features on other peoples&#8217; pages, meaning we&#8217;re in the unenviable position of having not only no control over the browser environment, but heavy restrictions in [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;d like to talk about <a href="http://developer.yahoo.com/yui/3/yui/#loader">YUI Loader</a> and how we at <a href="http://www.quorus.com/">Quorus, Inc.</a>, use it to provide third-party websites with new features on demand.</p>
<p><a href="http://quorus.com" class="img"><img src="http://yuiblog.com/assets/loader-at-quorus/quorus-screenshot.png" width="400" height="300" alt="Quorus screenshot"></a></p>
<p>The code we write powers features on other peoples&#8217; pages, meaning we&#8217;re in the unenviable position of having not only no control over the browser environment, but heavy restrictions in how we use the document itself. Our customers put a Quorus bootstrap script on their pages; everything else needed for our functionality is loaded dynamically and on demand. We go to heroic lengths to make sure that our elements, styles, and scripts do not alter the behavior of anything we&#8217;re not responsible for.</p>
<p>We started our present code base two years ago, when YUI 3 was just taking shape. It was a risky decision at the time to commit to a codebase that wouldn&#8217;t hit beta for several months. In retrospect I can&#8217;t imagine how we would have accomplished what we have without it. I haven&#8217;t seen any other framework that has components approaching the power of Loader, <a href="http://developer.yahoo.com/yui/3/attribute/">Attribute</a>, and <a href="http://developer.yahoo.com/yui/3/event/#customevent">CustomEvent</a>.</p>
<p>The Quorus <strong>bootstrap script</strong> we provide to our customers does almost nothing. Its job is just to load the core of our platform without blocking the rest of page load, and to queue any API calls until we&#8217;ve done so. This core script file, called <strong>stage2</strong>, inlines <code>yui</code>, <code>loader</code>, and <code>oop</code>, as well as enough smarts to load additional libraries to respond to API calls, user clicks, and other conditions in the operating environment. Most other resources are served by a custom combo server that serves custom Quorus and stock YUI modules.</p>
<p><code>Bootstrap</code> queues up API calls made in the host site&#8217;s code between when it loads and when we&#8217;re ready to go in an array on our global object, QUORUS:</p>
<pre><code>QUORUS._callbacks = [];
QUORUS.use = function () {
  // turn the arguments object into a regular array,
  // so that it can be stored safely
  var args = Array.prototype.slice.call(arguments, 0);
  QUORUS._callbacks.push(args);
};
</code></pre>
<p>Once we&#8217;re ready to process API calls, <code>stage2</code> runs them one by one in timeouts. This ensures we yield control regularly back to the browser, which makes the user experience more responsive. The behavior is a lot like Y.AsyncQueue, but simpler and doesn&#8217;t require YUI to be loaded:</p>
<pre><code>// Put the real 'use' function in place for any subsequent calls:
QUORUS.use = function (feature, callback) {
  YUI.use('module-that-provides-the-feature', function (Y) {
    // find the API for the requested feature, and pass it to the callback
    callback(Y.APIs[feature]);
    // process another pending API call, if any:
    setTimeout(processAPICall, 0);
  });
};

// Play catch-up, running each callback in sequence:
function processAPICall () {
  var callback = QUORUS._callbacks.shift();
  if (callback) {
    QUORUS.use.apply(QUORUS, callback);
  }
}

// Start processing the queue:
processAPICall();
</code></pre>
<p>The <code>bootstrap</code> file is, by this point, mostly immutable: it&#8217;s something we hand off to a customer, who might require a month or more to deploy any new version we gave them&mdash;an impossibly long time for an agile startup company. The <code>stage2</code> file, meanwhile, is small, loads from our own servers, and has a short cache lifetime. This ensures that no end user will have an old version for more than a few minutes. Nearly all the other resources we need are in permanently cacheable JavaScript libraries and CSS files.</p>
<p>When we release a new version of our code, <code>stage2</code> automatically directs browsers to start downloading from a new location, ensuring that they use only the newest code. This setup allows us to deploy changes quickly without serving up assets more often than necessary. Not only does this keep our bandwidth costs low, but it provides a better user experience: the cached resources load very quickly while the page is loading.</p>
<p><img src="http://yuiblog.com/assets/loader-at-quorus/quorus-load-flow.png" width="450" height="538" alt="Quorus JS loading flow diagram"></p>
<p>If we were starting our codebase today, with the benefit of the <a href="http://yuilibrary.com/gallery/show">YUI Gallery</a>, there are a number of components we might use to make our lives easier. One of them is Eric Ferraiuolo&#8217;s <a href="http://yuilibrary.com/gallery/show/base-componentmgr">Base Component Manager</a>, which assists with wiring up components (typically Widgets) on demand. Another might be <a href="http://yuilibrary.com/gallery/show/storage-lite">Storage Lite</a>, to help us retain application state across page loads.</p>
<p>Many thanks to the YUI team for their great work, and to the community for their contributions. If you would like to read about our approaches to sandboxing or to coordinating asynchronously loaded components, please let me know in the comments!</p>
<p class="authorbox"><img src="http://yuiblog.com/assets/loader-at-quorus/peter-abrahamsen.png" class="alignleft" width="150" height="150" alt="Peter Abrahamsen"><em><strong>About the author:</strong> Peter Abrahamsen writes Ruby and JavaScript, manages server infrastructure, and studies user-centered design in Seattle, Washington, USA. He can be found on <a href="http://yuilibrary.com/irc/">IRC</a> as Rainhead.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2011/03/24/loader-usage-at-quorus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bringing YUI Theater to Internet TVs</title>
		<link>http://www.yuiblog.com/blog/2010/12/06/bringing-yui-theater-to-internet-tvs/</link>
		<comments>http://www.yuiblog.com/blog/2010/12/06/bringing-yui-theater-to-internet-tvs/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 18:14:17 +0000</pubDate>
		<dc:creator>Chad Auld</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2990</guid>
		<description><![CDATA[I wanted to post a quick update on a few YUI related projects I&#8217;ve been working on with a friend of mine, Ozgur Cem Sen (@ozgurcemsen). Eric posted a few months ago about our efforts to bring YUI Theater to Boxee. We just finished reworking the UI for Boxee and added some new features such [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to post a quick update on a few YUI related projects I&#8217;ve been working on with a friend of mine, Ozgur Cem Sen (@ozgurcemsen). Eric posted a few months ago about <a href="http://www.yuiblog.com/blog/2010/07/22/yui-theater-on-boxee/">our efforts to bring YUI Theater to Boxee</a>. We just finished reworking the UI for Boxee and added some new features such as browsing by tags and search. We are currently working with the Boxee team to get the app added into the new <a href="http://www.dlink.com/boxee/">Boxee Box repository</a>. That is in addition to the standard repository they have for the desktop version. The Boxee Box repository has some stricter requirements around performance and video quality. The new versions should hopefully be out within the next week or so.</p>
<p>While finishing up the Boxee app we stumbled on the Samsung TV platform and the timing was perfect because they are actually running a &#8220;Free the TV&#8221; challenge. We came across the contest pretty late in the game and nearly missed the submission deadline, but we pushed hard and successfully recreated the same experience for Samsung in short order. If you have a few minutes please vote/help spread the word about our YUI Theater submission for Samsung &#8211; <a href="http://www.freethetvchallenge.com/submissions/249">http://www.freethetvchallenge.com/submissions/249</a>. We&#8217;ve got 50+ other entries to beat.</p>
<p>Last, but not least &mdash; we also just recently completed work on a YUI Theater app for <a href="http://plexapp.com/">Plex</a>. It isn&#8217;t in the official application repository yet, but the request is in. In the meantime you can download it from here if you&#8217;d like &mdash; <a href="http://wiki.plexapp.com/index.php/YahooYUITheater">http://wiki.plexapp.com/index.php/YahooYUITheater</a>.</p>
<p>Here are a few videos of the applications in action:</p>
<ul>
<li>Samsung TV app &#8211; <a href="http://www.youtube.com/watch?v=e1kRicivfDU">http://www.youtube.com/watch?v=e1kRicivfDU</a></li>
<li>Plex app &#8211; <a href="http://www.youtube.com/watch?v=oxBPqVQqdnY">http://www.youtube.com/watch?v=oxBPqVQqdnY</a></li>
<li>Boxee app &#8211; <a href="http://www.youtube.com/watch?v=IK4i1DksuhU">http://www.youtube.com/watch?v=IK4i1DksuhU</a></li>
</ul>
<p>You should expect to see similar efforts for Google TV and Yahoo! Connected TV in the not so distant future as well.</p>
<p>Hopefully these apps prove to be valuable resources for those that can&#8217;t typically attend the meetups and/or didn&#8217;t make the latest <a href="http://yuilibrary.com/yuiconf2010/schedule.php">YUIConf</a>.  We&#8217;ll continue to add new videos as they are released.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/12/06/bringing-yui-theater-to-internet-tvs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery and YUI 3: A Tale of Two JavaScript Libraries</title>
		<link>http://www.yuiblog.com/blog/2010/10/27/jquery-and-yui-3-a-tale-of-two-javascript-libraries/</link>
		<comments>http://www.yuiblog.com/blog/2010/10/27/jquery-and-yui-3-a-tale-of-two-javascript-libraries/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 22:08:35 +0000</pubDate>
		<dc:creator>Mark Rall</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2812</guid>
		<description><![CDATA[Recently I had the opportunity to build my first JavaScript front end application. What follows is a short story of the discovery and evolution that comes about when trying to use tools that aren&#8217;t suited for the job at hand. It is an account of the learning acquired through developing the same front end application [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had the opportunity to build my first JavaScript front end application. What follows is a short story of the discovery and evolution that comes about when trying to use tools that aren&#8217;t suited for the job at hand. It is an account of the learning acquired through developing the same front end application using two very different libraries, jQuery and YUI 3. Details of the client and the project have been intentionally omitted.</p>
<h3 id="overview">Overview</h3>
<p>The project involved the refactoring of several disparate Flash tools into a single interactive application based on open standards for a large content publisher. Of high importance, the application had to be highly optimised with a small initial foot print due the large number of daily page impressions the client receives. Several phases were involved, with the first being an initial proof of concept.</p>
<p>The concept involved the development of one view of what would be the completed application. It consisted of:</p>
<ul>
<li>An initial seed file (&lt; 1KB) responsible for the dynamic loading of any frameworks (e.g., jQuery or YUI 3) and the initial application file.</li>
<li>The development and inclusion of jQuery plugins to support form element styling and validation, and dynamic chart visualisations.</li>
<li>The generation and population of UI, based on user inputs, configuration defaults and the application&#8217;s location within the publisher&#8217;s site.</li>
<li>The calculation and presentation of information based on the user&#8217;s input.</li>
</ul>
<p>In the interest of full disclosure, my own experience up to this point had been in developing small, standalone solutions, the type of which you could typically describe as plugins. These included dynamic UI components such as image carousels, interactive maps and Twitter / Flickr widgets. At the time of first dabbling with JavaScript, jQuery was popular, easy to learn and allowed me to quickly pick up the basics needed for the projects I was working on. However these were all standalone units and had no need to interact with other code or as part of a larger application.</p>
<h3 id="first-attempt">First Attempt</h3>
<p>On completing the first phase of the project, it became painfully obvious that I was dealing with a very different beast than what I was used to. Having had little experience in code organisation, my code quickly became disorganised, inefficient and repetitive. As a result, the first part of what would become a much larger application was slow to load. In fact it took eight seconds to generate that single proof of concept. A big change was needed and while I had considered using a small library like <a href="http://dean.edwards.name/weblog/2006/03/base/" title="Dean Edward's Base">Dean Edward&#8217;s Base</a>  or <a href="http://ejohn.org/blog/simple-javascript-inheritance/" title="John Resig's Simple JavaScript Inheritance">John Resig&#8217;s Simple JavaScript Inheritance</a> pattern to add class-based inheritance to jQuery, I decided to go one step further.</p>
<p>What I wanted was a complete, mature framework within which to develop my first OO application. Something that would effectively guide me through the process. In reviewing the available libraries I decided to adopt YUI 3 for the following reasons:</p>
<ul>
<li>Integrated, inheritance-based application development support including attribute and class management.</li>
<li>Long term solution:
<ul>
<li>Support for standards and accessibility.</li>
<li>Funded by a large well known organisation, Yahoo!</li>
<li>Associated with respected names like <a href="http://www.crockford.com/">Douglas Crockford</a>, <a href="http://twitter.com/slicknet">Nicholas Zakas</a>, and <a href="http://twitter.com/stoyanstefanov">Stoyan Stefanov</a>.</li>
</ul>
</li>
<li>Performance optimisation:
<ul>
<li>Initial seed file of only 7KB.</li>
<li>Lazy-loaded modules on demand.</li>
<li>CDN delivery.</li>
</ul>
</li>
<li>Varied and comprehensive documentation:
<ul>
<li><a href="http://developer.yahoo.com/yui/3/">Yahoo! Developer Network</a></li>
<li><a href="http://developer.yahoo.com/yui/3/api/">YUI 3 API Documentation</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/">YUI Theater</a></li>
<li><a href="http://yuilibrary.com/">YUI Library</a></li>
<li><a href="http://www.yuiblog.com/">YUI Blog</a></li>
</ul>
</li>
<li>Mature, consistent evolution between releases.</li>
<li>Integrated tools in <a href="http://yuilibrary.com/projects/yuicompressor/">YUI Compressor</a>, <a href="http://yuilibrary.com/projects/yuidoc">YUIDoc</a>, <a href="http://yuilibrary.com/projects/builder">YUI Builder</a>, and <a href="http://developer.yahoo.com/yui/3/console/">Console</a>.</li>
<li>Not just JavaScript, a CSS framework too.</li>
</ul>
<h3 id="take-two">Take Two</h3>
<p>Integrating YUI 3 brought several direct and indirect benefits to the project:</p>
<ul>
<li>Inheritance-based architecture and class management through the <a href="http://developer.yahoo.com/yui/3/attribute/">Attribute</a> interface, and <a href="http://developer.yahoo.com/yui/3/base/">Base</a> and <a href="http://developer.yahoo.com/yui/3/widget/">Widget</a> classes producing performant, reusable and organised code.</li>
<li>Separation of presentation from model and data using the <a href="http://developer.yahoo.com/yui/3/widget/">Widget</a> class to render alternate views (inline or overlay) based on the application&#8217;s location within the site.</li>
<li><a href="http://developer.yahoo.com/yui/3/yui/#why">Sandboxing</a> and dynamic <a href="http://developer.yahoo.com/yui/3/yui/#modulelist">module</a> inclusion through YUI.use().</li>
<li>Cross-browser console debugging using <a href="http://developer.yahoo.com/yui/3/console/">YUI Console</a>.</li>
<li>On save, performance optimisation using <a href="http://yuilibrary.com/projects/yuicompressor/">YUI Compressor</a> in Eclipse.</li>
<li>Easy inclusion and integration of pre-existing jQuery plugins.</li>
<li>On save, automated code documentation using <a href="http://developer.yahoo.com/yui/yuidoc/">YUIDoc</a>.</li>
</ul>
<p>The final result was a happy client and a finished product with sub-second load times (remembering it took 8 seconds to load the initial proof of concept).</p>
<h3 id="lessons-learned">Lessons Learned</h3>
<dl>
<dt>Select the right tool for the job</dt>
<dd>
<p>In reading this post I&#8217;m sure some readers will view this as anti-jQuery. Not at all. jQuery is a fantastic project responsible for many innovations. But, as with any tool, it has its strengths and an intended purpose. Its strength lies in normalising browser inconsistencies, lowering the barrier to entry for the novice and improving the efficiency of experienced programmers. The primary learning that came out of the project was that you can&#8217;t rely on one tool for every job. YUI builds on what jQuery can provide by also offering a well architected application framework. But it&#8217;s fair to say that it comes at a cost, see the next point.</p>
</dd>
<dt>Steep learning curve</dt>
<dd>
<p>You need patience, especially when writing your very first application with an unfamiliar library as I did. However the payoff is immense. By learning another library, not only will your core JavaScript skills improve, you&#8217;ll also develop a deeper understanding of how libraries work and the benefits they bring. I try to learn something new about YUI everyday and the more I learn, the more I&#8217;m in awe of the thought and sheer talent that&#8217;s gone into building YUI.</p>
</dd>
<dt>Only load content when you need it</dt>
<dd>
<p>While it&#8217;s certainly programmatically easier to just to load everything you may need upfront, the performance improvements gained as a direct result of lazy loading content only when you need it is huge. This was one of the key contributing factors for drastically improving the performance of the application.</p>
</dd>
<dt>Interact with the DOM as little as possible</dt>
<dd>
<p>This point doesn&#8217;t relate to the specific library used. By caching the required DOM elements and utilising HTML templates more, UI rendering time fell considerably. Nodes can be cached using Y.one() while node lists can be captured using Y.all(). Also Y.Node.create() was very useful in efficiently converting large text strings of HTML to DOM elements prior to insertion.</p>
</dd>
<dt>Learn by example, use a CDN</dt>
<dd>
<p>In using YUI&#8217;s CDN delivered library we decided to deliver all the project&#8217;s assets via CDN. This was probably the next largest contributing factor to the performance improvement.</p>
</dd>
<dt>Pub, sub hubbub</dt>
<dd>
<p>For those experienced programmers out there, try not to laugh at this one. Having been used to writing little more than plugins in the past, I had no idea how applications should communicate internally. Even after reading &#8220;Custom Events allow you to publish the interesting moments or events in your own code so that other components on the page can subscribe to those events and respond to them,&#8221; I still missed it.</p>
<p>As it turns out, YUI&#8217;s custom event publish-and-subscribe model works beautifully for inter-class and inter-object communication. You can even subscribe pre and post to events and include dynamic logic to suppress bubbling based on certain conditions.</p>
</dd>
<dt>Integrate best practice into your workflow</dt>
<dd>
<p>Using Eclipse we were able to integrate JSLint and YUI Compressor into the build process. Put simply, every time you hit Ctrl / Cmd + S your JavaScript code is validated and optimised. That means you&#8217;re testing against optimised, production grade code from the very first line of code. It also means that you won&#8217;t forget to optimise in the frantic final race to the delivery deadline.</p>
</dd>
</dl>
<h3 id="learning-on-the-job">Learning YUI on the Job</h3>
<p>Although everyone has a different  learning style, I thought I&#8217;d share what resources I used to learn YUI with a specific objective in mind.</p>
<ul>
<li>Watch the relevant YUI Theater episodes to get a general overview of the library or learn a specific module. I can highly recommend starting with:
<ul>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=miraglia-yuiconf2009-yui3">Eric Miraglia&#8217;s Welcome to YUI 3</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=kloots-yuiconf2009-sugar">Todd Kloots on YUI 3 Sugar</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=sweeney-yuiconf2009-performance">Matt Sweeney&#8217;s YUI 3 Performance</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=smith-yuiconf2009-debugging">Luke Smith&#8217;s Debugging in YUI 3</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=schlueter-yuiconf2009-yui3">Isaac Schlueter on Solving Problems with YUI 3</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=ericf-yuiconf2009-webapps">Eric Ferraiuolo on Web App Development with YUI 3</a></li>
<li><a href="http://developer.yahoo.com/yui/theater/video.php?v=smith-yuiconf2009-events">Luke Smith&#8217;s Events Evolved</a></li>
</ul>
</li>
<li>Read up on YUI on the <a href="http://developer.yahoo.com/yui/3/">Yahoo! Developer Network</a>. I try to read a little bit every week and learn more each time I re-read it.</li>
<li>Read the <a href="http://developer.yahoo.com/yui/3/api/">API</a> documentation. If you can&#8217;t find it on YUI Theater or on the Developer Network, dig into the API. It even pays to read the code directly.</li>
<li>Read and post questions to the <a href="http://yuilibrary.com/forum/">forum on YUILibrary.com</a>.</li>
<li>Play a lot and have fun!</li>
</ul>
<h3 id="conclusion">Conclusion</h3>
<p>YUI 3 is a full-featured, mature and constantly evolving library suitable for small to large projects. As front end web applications become more complex, the need for libraries like YUI will grow. While for the uninitiated it can be a daunting experience at first, if you stick with it you will be rewarded.</p>
<div class="interview">
<div class="intro">
<p><img src="http://yuiblog.com/assets/mark-rall.jpg" width="150" height="150" hspace="10" vspace="5" align="right"><strong>About the Author:</strong> <em>Mark is a Senior Front End Developer at <a href="http://vi.com.au/">VI</a>, a multi-disciplinary communications agency established in 1981 with a design orientation. Today the agency fuses its work in digital, direct and design disciplines to deliver measurable outcomes for a broad range of B2C and B2B clients.</em></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/10/27/jquery-and-yui-3-a-tale-of-two-javascript-libraries/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Building TipTheWeb with YUI 3</title>
		<link>http://www.yuiblog.com/blog/2010/10/05/building-tiptheweb-with-yui-3/</link>
		<comments>http://www.yuiblog.com/blog/2010/10/05/building-tiptheweb-with-yui-3/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 05:35:33 +0000</pubDate>
		<dc:creator>Eric Ferraiuolo</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[In the Wild]]></category>
		<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2718</guid>
		<description><![CDATA[About the Author: Eric Ferraiuolo is a Director of TipTheWeb and Co-Founder of Oddnut Software. He writes on his blog: 925 HTML, and can be found on Twitter: @ericf. Eric was a featured presenter at YUIConf 2009. TipTheWeb is a new service that lets people directly support their favorite web content by tipping it. For [...]]]></description>
			<content:encoded><![CDATA[<p class="authorbox"><em><strong>About the Author:</strong> Eric Ferraiuolo is a Director of <a href="http://tiptheweb.org/">TipTheWeb</a> and Co-Founder of <a href="http://oddnut.com/">Oddnut Software</a>. He writes on his <strong>blog</strong>: <a href="http://925html.com/">925 HTML</a>, and can be found on <strong>Twitter</strong>: <a href="http://twitter.com/ericf">@ericf</a>.  <a href="http://developer.yahoo.com/yui/theater/video.php?v=ericf-yuiconf2009-webapps">Eric was a featured presenter at YUIConf 2009</a>.</em></p>
<p> <a href="http://tiptheweb.org/">TipTheWeb</a> is a new service that lets people directly support their favorite web content by tipping it. For instance, if you find a great blog post, you could tip it 25 cents. </p>
<p> TipTheWeb is a <strong>non-profit</strong> organization﻿ promoting <strong>freely-accessible</strong>, high-quality web content by <strong>awarding publishers</strong> that receive tips. If you publish online, you can use your TipTheWeb account to claim the places you publish to receive tips and be eligible to receive awards from TipTheWeb. </p>
<p> <img width="515" src="http://yuiblog.com/assets/ttw/ttw_landing.png" alt="Screenshot showing the Landing page of tiptheweb.org" /> </p>
<h3>TipTheWeb&#8217;s Use of YUI 3</h3>
<p> The user interface of TipTheWeb is <em>completely</em> built on top of YUI 3 (we drank the Kool-Aid.) The approach we took was to use YUI 3 as the foundation and structure for our JavaScript code. We&#8217;ve built <strong>33 custom YUI 3 modules</strong> (56 if you include submodules, plugins, and roll-ups), several of which we contributed the <strong>YUI 3 Gallery</strong>: <a href="http://yuilibrary.com/gallery/show/base-componentmgr">Component Manager</a>, <a href="http://yuilibrary.com/gallery/show/markout">Markout</a>, <a href="http://yuilibrary.com/gallery/show/overlay-extras">Overlay Extras</a>, and <a href="http://yuilibrary.com/gallery/show/resource">REST Resource</a>. </p>
<h4>Page-Level Classes</h4>
<p> The core features of TipTheWeb are implemented on a few highly-functional web pages which communicate with the server over Ajax. For each of these pages we created a custom YUI 3 module that exposes a <strong>page-level class</strong> used to coordinate actions between the functional parts of the page. </p>
<p> ﻿In one of our application&#8217;s main pages, the Tips page, you can see how this approach is applied with the page-level class <strong>TipsWindow</strong>. The main functional parts of the page are the widgets: <strong>CreateTip</strong> used for creating tips, and the <strong>TipList</strong> widgets for editing, canceling, and funding existing tips. </p>
<p> <img width="515" src="http://yuiblog.com/assets/ttw/ttw_tips.png" alt="Annotated diagram labeling the main Widgets and Components that make up the Tips page of TipTheWeb" /> </p>
<h4>A Lot of Overlays</h4>
<p> We use <code>Y.Overlay</code>s extensively throughout our application&#8217;s UI to implement user-interactions; this allows us to keep the interface clutter-free while still having the functionality for advanced features available on the page. We needed features that were not built into ﻿<code>Y.Overlay</code>, so we developed ﻿<a href="http://yuilibrary.com/gallery/show/overlay-extras">Overlay Extras</a>, which is in the YUI 3 Gallery and being used by a lot of other YUI 3 powered sites. Here are some place where we use Overlays on TipTheWeb: </p>
<p><img src="http://yuiblog.com/assets/ttw/ttw_cancel_confirm.png" alt="Screenshot showing the confirmation overlay that appears when canceling a tip" /></p>
<p><img src="http://yuiblog.com/assets/ttw/ttw_donate_custom.png" alt="Screenshot showing the overlay which contains a slider to allow a custom amount to be set when donating to TipTheWeb" /></p>
<p><img src="http://yuiblog.com/assets/ttw/ttw_claim_menu.png" alt="Screenshot showing the menu which lists the various places a user can claim and accept tips at" /></p>
<h3>Current State of TipTheWeb</h3>
<p> We&#8217;d love for you to try out <a href="http://tiptheweb.org/">TipTheWeb</a>; right now we are in invite-only beta, so <strong><a href="http://tiptheweb.org/notify">request an invite</a></strong> on our site and we&#8217;ll send you an invite code. </p>
<p> Be sure to catch our talk at ﻿<strong><a href="http://www.yuiblog.com/blog/2010/09/09/register-now-for-yuiconf-2010/">YUIConf 2010</a></strong> where we will be presenting (more in depth) on how we use YUI 3 and YQL at TipTheWeb. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/10/05/building-tiptheweb-with-yui-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementation Focus: Car Rental Express</title>
		<link>http://www.yuiblog.com/blog/2010/09/28/carrentalexpress/</link>
		<comments>http://www.yuiblog.com/blog/2010/09/28/carrentalexpress/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 14:01:48 +0000</pubDate>
		<dc:creator>Stefan Klopp</dc:creator>
				<category><![CDATA[In the Wild]]></category>
		<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2647</guid>
		<description><![CDATA[About the author: Stefan Klopp is the Director of Development for ExpressITech, the parent company of Car Rental Express. Stefan has been developing highly usable web solutions for the car rental industry in various roles over the last 6 years. He currently lives and works in Vancouver, British Columbia, Canada. Car Rental Express is the [...]]]></description>
			<content:encoded><![CDATA[<div class="authorbox">
<p><strong>About the author:</strong><img src="http://yuiblog.com/assets/carrentalexpress/profile-picture-small.jpg" align="right" /> Stefan Klopp is the Director of Development for <a href="http://www.expressitech.com/" title="Express Internet Technologies">ExpressITech</a>, the parent company of <a href="http://www.carrentalexpress.com" title="Car Rental Express">Car Rental Express</a>. Stefan has been developing highly usable web solutions for the car rental industry in various roles over the last 6 years. He currently lives and works in Vancouver, British Columbia, Canada.</p>
</p></div>
<p><a href="http://www.carrentalexpress.com/" title="Cheap Car Rentals - Compare Rental Agencies with Car Rental Express">Car Rental Express</a> is the leading independent car rental comparison website on the Internet. It lets users rent cars online in more than 1000 cities and airports around the world.</p>
<p>Our user base is largely non-technical, which means they want to compare prices and rent cars as easily as possible. With the relaunch of our website in June of 2010 we have implemented many components of YUI 2 to help provide our customers with an intuitive experience.</p>
<p><strong>Which YUI components are we using?</strong></p>
<p>The components that we&#8217;ve been using include <a href="http://developer.yahoo.com/yui/connection/" title="YUI 2: Connection Manager">Connection Manager</a>, <a href="http://developer.yahoo.com/yui/autocomplete/" title="YUI 2: AutoComplete">AutoComplete</a>, <a href="http://developer.yahoo.com/yui/datasource/" title="YUI 2: DataSource">DataSource</a>, <a href="http://developer.yahoo.com/yui/calendar/" title="YUI 2: Calendar">Calendar</a>, <a href="http://developer.yahoo.com/yui/animation/" title="YUI 2: Animation">Animation</a>, <a href="http://developer.yahoo.com/yui/json/" title="YUI 2: JSON utility">JSON</a>, and <a href="http://developer.yahoo.com/yui/container/" title="YUI 2: Container">Container</a>.</p>
<p><strong>Why we chose YUI</strong></p>
<p>When reviewing the different JavaScript libraries that we could potentially use on <a href="http://www.carrentalexpress.com/" title="Cheap Car Rentals - Compare Rental Agencies with Car Rental Express">Car Rental Express</a>, we found that the YUI was the most complete for our needs. The biggest selling features for us was the very modular approach the YUI took to implement different design patterns, as well as the robust documentation and examples they provided. From a development standpoint this led to rapid development of our application without having to struggle with a library.</p>
<p><strong>How we use YUI</strong></p>
<p>We utilize the YUI in a number of ways. Our 4 most used components are AutoComplete, Calendar, Container, and Connection Manager. Here are some of the ways we use each of these components.</p>
<p><strong><a href="http://developer.yahoo.com/yui/autocomplete/" title="YUI 2: AutoComplete">AutoComplete</a></strong></p>
<p>The AutoComplete component is used extensively on our site to help users find a city or airport in which to rent a car. We really liked how easy it was to implement this component, and how quickly it responds. We cache search results server-side to help improve search results; however, having the client-side caching also helped tremendously in speeding up the response of the component. Another feature that we really took to was how easy the results were to style. When displaying the locations to the user this was crucial as we needed to identify which locations where found in cities and which were found at airports.</p>
<p><img src="http://yuiblog.com/assets/carrentalexpress/auto-complete-styled.png" title="Auto Complete Component Styled" width="510" /></p>
<p><strong><a href="http://developer.yahoo.com/yui/calendar/" title="YUI 2: Calendar">Calendar</a></strong></p>
<p>The Calendar component is also used throughout the site when a renter is filling in dates to conduct a search. We are using a customized version of John Peloquin&#8217;s <a href="http://developer.yahoo.com/yui/examples/calendar/intervalcal.html" title="YUI Library Examples: Calendar Control: Interval Selection Calendar">Interval Selection Calendar</a> and displaying it in a <a href="http://developer.yahoo.com/yui/container/dialog/" title="YUI 2: Dialog">YUI Dialog</a>. Essentially what we wanted to do was give the renter a two-month view when choosing their dates, as well as visually show them what date range they currently have selected. Again, this was extremely straightforward to implement using YUI 2 Calendar, and it basically came down to creating a YUI Dialog, setting the body to contain a div for the Calendar, then attaching a YUI Interval Calendar to that div.</p>
<p><img src="http://yuiblog.com/assets/carrentalexpress/calendar.png" title="Interval Calendar" width="510" /></p>
<p><strong><a href="http://developer.yahoo.com/yui/container/" title="YUI 2: Container">Containers</a></strong></p>
<p>We utilize YUI Containers throughout our website in a number of different ways. In the example above we were using a Dialog to help us display the Interval Calendar when a user was selecting a date. On our rate search results page we make heavy use of Containers to give the renter more information on different aspects of the car rental agency and the vehicle they might potentially rent. Most of the containers on this page are <a href="http://developer.yahoo.com/yui/container/panel/" title="YUI 2: Panel">Panels</a> that we re-use for each different listing. For example, the vehicle display features Panel:</p>
<p><img src="http://yuiblog.com/assets/carrentalexpress/standard-panel.png" title="Standard Panel" width="510"  /></p>
<p>Things got a little more fun  with the Renter Rated agency ratings. When displaying the ratings, we really wanted to focus the user&#8217;s attention to the scores an agency received and to display this information in a clean, easy-to-view way. By utilizing the Dialog Control we were able to constrain the viewport and center the dialog easily to help us achieve this goal. By setting a blank header and footer it made styling simple by just adding the appropriate styles to our CSS. The end result was a clean ratings container that provides the renter with the information they want.</p>
<p><img src="http://yuiblog.com/assets/carrentalexpress/renter-rated-dialog.png" title="Dialog Container Styled" width="510" /> </p>
<p><strong><a href="http://developer.yahoo.com/yui/connection/" title="YUI 2: Connection Manager">Connection Manager</a></strong></p>
<p>Connection Manager is used throughout the site whenever we need to pull data via a XHR request. In some of the examples above we utilize this component for requesting cities and airports for the AutoComplete implementaitons and pulling the rating information for the Renter Rated Dialog.</p>
<p>One interesting way we utilize Connection Manager is with our rental center block that sits on most pages. To help with performance we do a lot of full-page caching on many of our content pages. However, we still wanted to display the dynamic rental center block on these pages. This presented us with a problem we were able to solve with Connection Manager. Rather than having to break up our fully cached page and cache only aspects of the page we found it was easier to just include the rental center block via a simple asynchronous request. We found that this allowed us to retain the performance from having a fully cached page, yet still display dynamic content in our rental center box.</p>
<p><img src="http://yuiblog.com/assets/carrentalexpress/rental-center-included-va-connection.png" title="Rental Center included via Connection Component" width="510" /></p>
<p><strong>Final Thoughts</strong></p>
<p>Overall we have been extremely happy with our choice to use YUI. It provides us with a modular library that is well documented, easy to use and implement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/09/28/carrentalexpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Implementation Focus: Lamplight</title>
		<link>http://www.yuiblog.com/blog/2010/09/15/implementation-focus-lamplight/</link>
		<comments>http://www.yuiblog.com/blog/2010/09/15/implementation-focus-lamplight/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 17:00:34 +0000</pubDate>
		<dc:creator>Jenny Donnelly</dc:creator>
				<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2601</guid>
		<description><![CDATA[Matt Parker (@Lamplightdb on Twitter) is the founder and developer at Lamplight Database Systems, a small company providing a fully-featured web-based management system for non-profits in the UK. Matt lives and works in North-West London. What is Lamplight? Lamplight is a database for charities and voluntary groups (that&#8217;s non-profits) in the UK. It helps our [...]]]></description>
			<content:encoded><![CDATA[<div class="interview">
<div class="intro">
<p><img align="right" src="http://yuiblog.com/assets/Mattlamp.jpg" hspace=10 vspace=10 height=106 width=132><em>Matt Parker (<a href="http://twitter.com/Lamplightdb">@Lamplightdb on Twitter</a>) is the founder and developer at <a href="http://www.lamplightdb.co.uk/">Lamplight Database Systems</a>, a small company providing a fully-featured web-based management system for non-profits in the UK.  Matt lives and works in North-West London.</em></p>
</div>
<p class="q"><strong>What is Lamplight?</strong></p>
<p>Lamplight is a database for charities and voluntary groups (that&#8217;s non-profits) in the UK. It helps our customers keep their data efficiently, demonstrate the impact they have on the people they work with, and streamline administrative and reporting tasks. We&#8217;ve been going since 2004 and re-wrote the entire system in 2009, using YUI2 very heavily.</p>
<p>Lamplight has a pretty demanding bunch of users: they are generally not very keen to be sat in front of a computer &mdash; they want to be out working with the people they serve. So Lamplight&#8217;s got to be intuitive to use, responsive, and make their jobs easier.</p>
<p>We&#8217;re also committed to making it affordable for the smallest organisations &mdash; a hosted system starts at &#163;15/month (for the whole organisation). So we work really hard to make a single system that is flexible enough for a whole range of different organisations to use without becoming impossible to manage and administer.</p>
<p class="q"><strong>Which YUI components do you use?</strong></p>
<p>It&#8217;s easier to list the ones we don&#8217;t: Carousel, Charts, Cookie, ImageCropper, ImageLoader, Layout, ProgressBar, Slider, Storage, SWF and TreeView. Everything else is in there to a greater or lesser extent. <a href="http://developer.yahoo.com/yui/datatable/">DataTable</a>, <a href="http://developer.yahoo.com/yui/editor/">Editor</a> and <a href="http://developer.yahoo.com/yui/menu/">Menu</a> get the biggest workouts.</p>
<p class="q"><strong>Why did you choose YUI?</strong></p>
<p>First impressions go a long way. While I was trying out some of the libraries, YUI widgets seemed to be the most responsive, and/or the most reliable in different browsers. And then it doesn&#8217;t take long to realise the documentation, examples, and forums are really impressive too.</p>
<p>In some ways it&#8217;s made things harder &mdash; we use Zend Framework on the server, which (now) comes with Dojo &#8216;built in&#8217; &mdash; but I&#8217;m pretty sure it was the right decision.</p>
<p class="q"><strong>What have you had most fun with?</strong></p>
<p>We&#8217;re just about to push the new YUI 2 based Diary to all our customers. Diary&#8217;s my own creation, and it seems to be working pretty well. It does what you expect a diary to do &mdash; drag and drop appointments, click and drag to add, and so on. It&#8217;s built on a whole stack of existing YUI 2 components (the <a href="http://developer.yahoo.com/yui/resize/">Resize</a> utility, <a href="http://developer.yahoo.com/yui/dragdrop/">Drag &amp; Drop</a>, and <a href="http://developer.yahoo.com/yui/docs/module_datemath.html">DateMath</a> in particular). Diary is on GitHub, along with the API docs and a few examples (<a href="http://mattparker.github.com/diary/">http://mattparker.github.com/diary/</a>)</p>
<p><img src="http://yuiblog.com/assets/lamplight/lamplight-diary.jpg" width="510" height="311" alt="Screenshot of Lamplight's Diary"></p>
<p>I&#8217;ve also enjoyed working with <a href="http://developer.yahoo.com/yui/datatable/">DataTable</a>. I&#8217;ve added a column chooser context menu, used and added a bit to <a href="http://satyam.com.ar/yui/#keynav">Satyam&#8217;s work with key navigation around an editable table</a>, and implemented remote sorting/paging with the server returning HTML.</p>
<p>And <a href="http://developer.yahoo.com/yui/editor/">Editor&#8217;s</a> received some attention too: we have mail-merge menu buttons, some extra HTML filter buttons to handle content pasted from MS Word, a document templating system, and a built-in image insertion/uploader (images come from our server).</p>
<p><img src="http://yuiblog.com/assets/lamplight/lamplight-editorform.jpg" width="510" height="351" alt="Screenshot of Lamplight's Editor"></p>
<p>Finally, we&#8217;ve got a very simple ACL system, so that (for example) I only need one set of context menus that enable or disable items depending on who&#8217;s logged in &mdash; I think it&#8217;s good to know what you can&#8217;t do, rather than searching for a removed &#8216;delete&#8217; option!</p>
<p class="q"><strong>What&#8217;s been hardest?</strong></p>
<p>Managing all the widgets that come and go. There shouldn&#8217;t ever be a page load until you log out, and in that time there are a lot of DataTables, TabViews, Buttons, ContextMenus&#8230; coming and going. Sometimes these&#8217;ll be in a Dialog, so I can&#8217;t just destroy() them on every ajax request, for example. I&#8217;ve ended up with a singleton WidgetManager, which stores sets of widgets (for example a form with some Buttons and a DataTable) and destroys (or hides them out the way, in the case of Editor) them at the right moment. All these widgets register themselves with the WidgetManager when they&#8217;re constructed. And we re-wrote fair chunks so that there&#8217;s only a single Editor, Dialog, and Panel that get re-used whenever they&#8217;re needed. Fortunately this wasn&#8217;t too painful as they&#8217;re all wrapped on the server by PHP classes, so I only needed to alter my Yui_Datatable or Yui_Form (for example) classes.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/09/15/implementation-focus-lamplight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using YUI 2 on the DuckDuckGo Search Engine</title>
		<link>http://www.yuiblog.com/blog/2010/08/19/yui-at-duckduckgo/</link>
		<comments>http://www.yuiblog.com/blog/2010/08/19/yui-at-duckduckgo/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 13:41:07 +0000</pubDate>
		<dc:creator>Gabriel Weinberg</dc:creator>
				<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2459</guid>
		<description><![CDATA[DuckDuckGo is a search engine that uses YUI extensively. Here&#8217;s what it uses in particular: ImageLoader. Matt Mlinac&#8217;s YUI 2 ImageLoader was the first thing I implemented and what originally hooked me on YUI for this project. DuckDuckGo has favicons next to results and often has &#8220;Zero-click Info&#8221; above results that usually includes an image. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://duckduckgo.com/?q=yui+library"><img src="http://yuiblog.com/assets/duckduckgo-20100817-115307.jpg"></a></p>
<p><a href="http://duckduckgo.com/">DuckDuckGo</a> is a search engine that uses YUI extensively. Here&#8217;s what it uses in particular:</p>
<ul>
<li>
<p><i>ImageLoader</i>. Matt Mlinac&#8217;s <a href="http://developer.yahoo.com/yui/imageloader/" title="YUI 2: ImageLoader">YUI 2 ImageLoader</a> was the first thing I implemented and what originally hooked me on YUI for this project. DuckDuckGo has favicons next to results and often has &#8220;Zero-click Info&#8221; above results that usually includes <a href="http://duckduckgo.com/Yahoo!_UI_Library">an image</a>. I didn&#8217;t want these images to compete with the results when loading, as getting results as fast as possible is the ultimate goal.</p>
<p>The ImageLoader Utility handles this well by loading the images after the page load. DDG also auto-loads the next page of results when you scroll down. Sometimes the favicons icons are therefore hidden, and with ImageLoader their load is delayed (sometimes indefinitely) until necessary. To accomplish this, there is a different image group per (internal) page, each with its own custom trigger.</p>
<pre>div.event=new YAHOO.util.CustomEvent('it');
    var ig1=new YAHOO.util.ImageLoader.group(div,'click');
    ig1.addCustomTrigger(div.event);
    div.ig = ig1;
</pre>
<li>
<p><i>Cookie</i>. DuckDuckGo has a lot of <a href="http://duckduckgo.com/settings.html">settings</a>, which are stored via cookies and alternately via  <a href="http://duckduckgo.com/params.html">URL params</a>. When cookies are used, I use Nicholas Zakas&#8217;s <a href="http://developer.yahoo.com/yui/cookie/" title="YUI 2: Cookie Utility">YUI 2 Cookie Utility</a> to easily get and set the values.</p>
<pre>  YAHOO.util.Cookie.set(cookie, value, { expires: new Date("January 12, 2025") });
  x=ki||YAHOO.util.Cookie.get("i");</pre>
<li>
<p><i>StyleSheet</i>. Some DDG settings change the look and feel of the site. These changes are actually accomplished after page load via Luke Smith&#8217;s <a href="http://developer.yahoo.com/yui/stylesheet/" title="YUI 2: StyleSheet Utility">YUI 2 StyleSheet Utility</a>. Some of these changes are straightforward and I can just use the <a href="http://developer.yahoo.com/yui/docs/YAHOO.util.Dom.html#method_setStyle" title="API: dom  YAHOO.util.Dom   (YUI Library)"><code>setStyle</code> Dom function</a>.</p>
<pre>YAHOO.util.Dom.setStyle('b2','display','block');</pre>
<p>Others require actual class changes, which I use the utility to do.</p>
<pre>YAHOO.util.StyleSheet('DDG').set('.ci', {display: "block"}).
            set('.cid', {display: "block"}).
            set('.ci2', {display: "block"}).
            enable();</pre>
<li>
<p><i>Dom</i>. I also use some functions in Matt Sweeney&#8217;s base <a href="http://developer.yahoo.com/yui/dom/" title="YUI 2: Dom Collection">YUI 2 Dom component</a>. I referenced <code>setStyle</code> above, and I also use the related <code>getStyle</code>, <code>addClass</code> and <code>removeClass</code> functions. In addition, I find the <code>getViewportHeight</code>, <code>getViewportWidth</code>, <code>getX</code> and <code>getY</code> functions to be incredibly useful to make things work cross-browser, and now on mobile screens as well.</p>
<li>
<p><i>KeyListener</i>. DDG has a bunch of <a href="http://duckduckgo.com/goodies.html">keyboard shortcuts</a> that let you navigate results without the mouse. I use the <a href="http://developer.yahoo.com/yui/docs/YAHOO.util.KeyListener.html" title="API: event  YAHOO.util.KeyListener   (YUI Library)">YUI 2 KeyListener</a> component to enable these shortcuts.</p>
<pre>kl14 = new YAHOO.util.KeyListener(document, { keys:[70] }, { fn:not } );kl14.enable();</pre>
<li>
<p><i>AutoComplete</i>. I&#8217;m currently working on adding search suggestions to the search engine, and will be using Jenny Donnelly&#8217;s <a href="http://developer.yahoo.com/yui/autocomplete/" title="YUI 2: AutoComplete">YUI 2 AutoComplete</a> component for the front-end. I understand that AutoComplete is getting introduced in YUI 3 soon. Everything else I use has already been introduced in YUI 3, though I still use YUI 2. However, I will be exploring the migration to YUI 3 soon.</p>
</ul>
<p class="authorbox"><em><img align="right" hspace="20" vspace="5" src="http://yuiblog.com/assets/gabrielweinberg.jpg"><strong>About the author:</strong> Gabriel Weinberg is the founder of the DuckDuckGo search engine, based out of Valley Forge, PA. Gabriel has been a startup founder for over ten years, and his last company was sold in 2006. Gabriel holds degrees from MIT in Physics and the Technology and Policy Program.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/08/19/yui-at-duckduckgo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Implementing YUI on the Assembla.com Agile Planner</title>
		<link>http://www.yuiblog.com/blog/2010/08/18/yui3-at-assembla/</link>
		<comments>http://www.yuiblog.com/blog/2010/08/18/yui3-at-assembla/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 14:35:45 +0000</pubDate>
		<dc:creator>Joachim Larsen</dc:creator>
				<category><![CDATA[YUI Implementations]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=2453</guid>
		<description><![CDATA[Fast and fun – that was the user requirement for the new Assembla.com Agile Planner – an AJAX interface for adding development tasks, building story/feature outlines, and scheduling them into releases. We were lucky to have YUI 3 to make it fast and fun to implement as well. I had used YUI 2 for a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.assembla.com/assemblablog/tabid/12618/bid/12940/Upgraded-Agile-Planner-for-Fast-Fun-Roadmapping.aspx" title="Upgraded Agile Planner for Fast, Fun Roadmapping"><img src="http://yuiblog.com/assets/assembla-20100818-072550.jpg"></a></p>
<p>Fast and fun – that was the user requirement for <a href="http://blog.assembla.com/assemblablog/tabid/12618/bid/12940/Upgraded-Agile-Planner-for-Fast-Fun-Roadmapping.aspx" title="Upgraded Agile Planner for Fast, Fun Roadmapping">the new Assembla.com Agile Planner</a> – an AJAX interface for adding development tasks, building story/feature outlines, and scheduling them into releases.  We were lucky to have <a href="http://developer.yahoo.com/yui/3/" title="YUI 3 &mdash; Yahoo! User Interface Library">YUI 3</a> to make it fast and fun to implement as well.</p>
<p>I had used <a href="http://developer.yahoo.com/yui/2/" title="YUI 2 &mdash; Yahoo! User Interface Library">YUI 2</a> for a number of prior projects and I had been impressed by the engineering of the UI components and the underlying library infrastructure. I wanted to learn more about YUI 3, with its compact syntax and deeper focus on DOM manipulation and CSS3-style selectors.   This project, with a low dependence on &#8216;prebuilt widgets,&#8217; was a perfect opportunity to get my feet wet with YUI 3.  The facilities for &#8216;large app&#8217; implementation via custom modules and integration with YUI loader made it a natural choice.</p>
<p>The Agile Planner supports a number of drag and drop user interactions with multiple interaction groups and context based behaviors. At the same time, it handles a complex set of interactions with the server, including merging in new data from the server, and propagating changes to the server.</p>
<p>We improved on the existing Planner which was based on Rails handlers and Prototype.js.  YUI&#8217;s sandbox philosophy and strong OOP facilities made coexisting with Prototype.js a breeze.</p>
<p>We used a large number of YUI components, including:</p>
<ul>
<li>Async-Queue to offer a responsive experience on a page that can involve 1000+ simultaneous tickets</li>
<li>Drag and Drop with interaction groups. </li>
<li>IO as a connection manager to queue and massage server interaction.</li>
<li>Event-delegate to allow simply hydrating html templates and forgetting about them.</li>
<li>Event-key for keyboard interaction and navigation.</li>
<li>Collection for giving us a consistent implementation experience across browsers.</li>
<li>Cookie for easy short-term UI persistence. </li>
<li>Profiler to find the biggest speed gains</li>
<li>YUI Doc to leave information for the rest of the team</li>
</ul>
<p>Working with YUI 3 on an app like this has been fun, and I am looking forward to hearing what our users will urge us to do next!</p>
<p class="authorbox"><em><strong>About the author:</strong> Joachim Larsen is a frontend engineer with Assembla.com.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/08/18/yui3-at-assembla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

