<?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>Ajax Bestiary &#187; YUI</title>
	<atom:link href="http://www.ajaxbestiary.com/category/yui/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajaxbestiary.com</link>
	<description>AJAX Development, News, Techniques &#38; More</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:46:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Loopy Optimizations</title>
		<link>http://www.ajaxbestiary.com/2012/01/16/loopy-optimizations/</link>
		<comments>http://www.ajaxbestiary.com/2012/01/16/loopy-optimizations/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 19:11:18 +0000</pubDate>
		<dc:creator>Dave Mahon</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[loops]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/?p=623</guid>
		<description><![CDATA[We all know that code optimization is important, especially when processing large quantities of data. It is also common knowledge that adding layers of code to loops reduces performance. Except this maxim doesn&#8217;t always hold when it comes to JavaScript in browsers and even native methods can vary wildly in performance. In fact, in almost [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>We all know that code optimization is important, especially when processing large quantities of data. It is also common knowledge that adding layers of code to loops reduces performance. Except this maxim doesn&#8217;t always hold when it comes to JavaScript in browsers and even native methods can vary wildly in performance. In fact, in almost all cases, Underscore, jQuery and YUI outperformed any of the native methods. Interestingly, the newest implementation for native looping, forEach, consistently trumped a traditional <code>for (var i = 0; i &lt; 2500; i++)</code> loop.</p>
<p>I set up a testing framework that looped through a normal array instantiated like so:</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> v <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: #006600; font-style: italic;">//This value doesn't seem to affect performance at the data size I chose</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> loops<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">//loops is defined elsewhere</span>
   data.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>v<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p></code></p>
<p>I looped through this array using the following methods:</p>
<ul>
<li>for loop</li>
<li>for &#8230; in &#8230; loop</li>
<li>forEach loop (not supported in IE9 Quirks Mode)</li>
<li>Prototype 1.7: Enumerable.each</li>
<li>jQuery 1.7.1: $.each</li>
<li>Underscore 1.2.3: _.each</li>
<li>YUI 3.1.4: YUI.each</li>
</ul>
<p>Each loop was passed the value of the array element and returned immediately, like so:</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//From the native for and for ... in ... tests</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>el<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p></code></p>
<p>I eventually settled upon an array of 2500 elements and running the test 200 times to collect a reasonable number of samples. These numbers were not chosen arbitrarily. Prototype would time out on Firefox at 5000 array elements and Safari seemed to have wildly varying results on each run of the suite with fewer than 200 samples. With 200 samples, the variance in mean time between runs became a few hundredths of a millisecond, not enough to be of consequence. Disturbingly, while Prototype froze the browser with 5000 array elements and 100 samples, it had no issue with 2500 elements and 200 samples. Even so, with some tests averaging less than a hundredth of a millisecond, we will soon require much larger data sets to get meaningful results at all, which may preclude the inclusion of Prototype (and even native methods!) in future tests.</p>
<p>All tests were run in a freshly launched browser on an updated operating system (either MacOS 10.7.2 or Windows 7 Home Premium) running on a MacBook Pro with a 2.53GHz Intel Core 2 Duo processor and 4GB of 1067MHz DDR3 RAM. Firefox had all add-ons disabled and Internet Explorer had the Developer Tools open (to switch between Standards and Quirks mode).</p>
<p>So let&#8217;s look at some charts!</p>
<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.ajaxbestiary.com/wp-content/uploads/2012/01/mac-safari.png" alt="Mac safari" title="mac-safari.png" border="0" width="600" height="337" /><br />
This was certainly an interesting start to the process. YUI, Underscore and jQuery all clocked in at 0.005 ms. Prototype would prove to be faster than native methods, with the exception of forEach, on all browsers. Underscore was only be outperformed on IE 9 (32-bit, Standards Mode).</p>
<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.ajaxbestiary.com/wp-content/uploads/2012/01/mac-chrome.png" alt="Mac chrome" title="mac-chrome.png" border="0" width="600" height="338" /><br />
Chrome was exceptional as well, with the traditional for loop actually running slower than <code>for ... in ...</code>. This behavior was also seen on Chrome for Windows and Safari for Windows.</p>
<p>Since all of the major browsers are clearly pre-optimized for these libraries (as they themselves wrap the native looping language structures), let&#8217;s look at just the libraries:<br />
<img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.ajaxbestiary.com/wp-content/uploads/2012/01/all-libraries.png" alt="Loop run times, by library" title="loop-by-library.png" border="0" width="600" height="338" /><br />
Here we can begin to see that Prototype really is behind its peers in loop performance. While we are talking fractions of a millisecond, our apps are growing larger by the day and this could become a serious issue.</p>
<p><a href="http://www.ajaxbestiary.com/wp-content/uploads/2012/01/sans-prototype.png"><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.ajaxbestiary.com/wp-content/uploads/2012/01/sans-prototype.png" alt="Run times of non-prototypical libraries by browser" title="sans-prototype.png" border="0" width="600" height="399" /></a><br />
Hey! It looks like Firefox really is slow. Curiously, IE 9 is significantly faster, which flies in the face of most generalized JavaScript performance metrics.</p>
<p>Still, something looks odd about IE:<br />
<img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.ajaxbestiary.com/wp-content/uploads/2012/01/ie9-libraries.png" alt="Run times by library and version of Internet Explorer 9" title="mac-chrome.png" border="0" width="600" height="338" /><br />
Your mileage varies wildly depending on whether you choose standards or quirks mode, and not always in obvious ways. In general, 64-bit is faster, but only marginally, and most people are not using it. (You have to explicitly launch it, as it is not the default, even on 64-bit Windows). Meanwhile, quirks mode apparently embeds some performance hacks. As a note to benchmark developers, this should be evidence enough that not all IE&#8217;s are the same and we need to start breaking down by rendering mode and compilation.</p>
<p>So far, we&#8217;ve seen the average times and most browsers are quite acceptable. What are the worst case scenarios?</p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<p>Platform</p>
</td>
<td>
<p>Browser</p>
</td>
<td>
<p>Method</p>
</td>
<td>
<p>Max (ms)</p>
</td>
<td>
<p>Mean (ms)</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (64-bit IE 9 Quirks)</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>93</p>
</td>
<td>
<p>5.29</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (32-bit IE 9 Standards)</p>
</td>
<td>
<p>forEach</p>
</td>
<td>
<p>81</p>
</td>
<td>
<p>4.04</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (64-bit IE 9 Quirks)</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>81</p>
</td>
<td>
<p>6.27</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (32-bit IE 9 Standards)</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>76</p>
</td>
<td>
<p>9.87</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (64-bit IE 9 Standards)</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>71</p>
</td>
<td>
<p>4.89</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (32-bit IE 9 Quirks)</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>67</p>
</td>
<td>
<p>5.995</p>
</td>
</tr>
<tr>
<td>
<p>MacOS 10.7.2</p>
</td>
<td>
<p>Firefox 9.0.1</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>55</p>
</td>
<td>
<p>1.885</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>Firefox 9.01</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>52</p>
</td>
<td>
<p>6.055</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (32-bit IE 9 Quirks)</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>49</p>
</td>
<td>
<p>4.66</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (64-bit IE 9 Standards)</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>48</p>
</td>
<td>
<p>4.76</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>IE 9.0.8112.16421 (32-bit IE 9 Standards)</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>39</p>
</td>
<td>
<p>7.845</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>Chrome 16.0.912.75 m</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>30</p>
</td>
<td>
<p>1.13</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>Chrome 16.0.912.75 m</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>26</p>
</td>
<td>
<p>1.315</p>
</td>
</tr>
<tr>
<td>
<p>MacOS 10.7.2</p>
</td>
<td>
<p>Chrome 16.0.912.75</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>23</p>
</td>
<td>
<p>1.175</p>
</td>
</tr>
<tr>
<td>
<p>MacOS 10.7.2</p>
</td>
<td>
<p>Chrome 16.0.912.75</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>22</p>
</td>
<td>
<p>1.085</p>
</td>
</tr>
<tr>
<td>
<p>MacOS 10.7.2</p>
</td>
<td>
<p>Safari 5.1.2</p>
</td>
<td>
<p>for in</p>
</td>
<td>
<p>16</p>
</td>
<td>
<p>1</p>
</td>
</tr>
<tr>
<td>
<p>Windows 7</p>
</td>
<td>
<p>Firefox 9.01</p>
</td>
<td>
<p>jQuery</p>
</td>
<td>
<p>6</p>
</td>
<td>
<p>0.185</p>
</td>
</tr>
<tr>
<td>
<p>MacOS 10.7.2</p>
</td>
<td>
<p>Safari 5.1.2</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>5</p>
</td>
<td>
<p>0.52</p>
</td>
</tr>
<tr>
<td>
<p>MacOS 10.7.2</p>
</td>
<td>
<p>Firefox 9.0.1</p>
</td>
<td>
<p>for</p>
</td>
<td>
<p>5</p>
</td>
<td>
<p>0.7</p>
</td>
</tr>
</table>
<p>Those averages hid some extreme variations within Internet Explorer. Fortunately, most of these are found using native language structures, which we know better than to use.</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2012/01/16/loopy-optimizations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>YUI Calendar Popup from Text Input</title>
		<link>http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/</link>
		<comments>http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 01:05:20 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Widget]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[calendar]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/?p=327</guid>
		<description><![CDATA[I needed a way to provide my users with a date picker that was automatically provided when a text area received focus.  I was eager to use the excellent YUI calendar as a starting point, but the provided documentation didn&#8217;t provide a solid example for this type of implementation. Dav Glass has provided a solid [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>I needed a way to provide my users with a date picker that was automatically provided when a text area received focus.  I was eager to use the excellent <a title="Yui Calendar Documentation" href="http://developer.yahoo.com/yui/calendar/">YUI calendar</a> as a starting point, but the provided documentation didn&#8217;t provide a solid example for this type of implementation.</p>
<p>Dav Glass has provided a solid example of the<a href="http://blog.davglass.com/files/yui/cal2/"> Calendar tied to a text input</a>. But, his example is highly dependent on the text input having specific ids.  This doesn&#8217;t take advantage of YUI&#8217;s excellent Selector library really didn&#8217;t meet my need for a simple universal solution.</p>
<h2><span style="font-weight: normal;">K</span>ey Requirements:</h2>
<ol>
<li>Progressive Enhancement (No inline javascript)</li>
<li>Yui based</li>
<li>Universal implementation across all pages in a site.</li>
<li>Support for multiple date inputs on a page.</li>
</ol>
<h2>Getting Started:</h2>
<div>The bulk of the code used is pretty solidly Dav&#8217;s I&#8217;ve simply replaced all of the hard coded references to dynamically generated targets and moved from hard coded ID&#8217;s for the target fields to a css class.  Lastly, I&#8217;ve added a &#8220;activeCal&#8221; class to the currently active target input so that one calendar can be recycled across multiple text areas on the page.</div>
<h2>Source:</h2>
<p><code></p>
<div>var cal1;</div>
<div>var over_cal = false;</div>
<div>function transmogCals() {</div>
<div>    cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");</div>
<div>    cal1.selectEvent.subscribe(getDate, cal1, true);</div>
<div>    cal1.renderEvent.subscribe(setupListeners, cal1, true);</div>
<div>    var pickers =  YAHOO.util.Selector.query('.date-picker'); </div>
<div>for( i in pickers){</div>
<div>    YAHOO.util.Event.addListener(pickers[i], 'focus', showCal);</div>
<div>    YAHOO.util.Event.addListener(pickers[i], 'blur', hideCal);</div>
<div>    }</div>
<div>cal1.render();</div>
<div>}</div>
<div>function setupListeners() {</div>
<div>    YAHOO.util.Event.addListener('cal1Container', 'mouseover', overCal);</div>
<div>    YAHOO.util.Event.addListener('cal1Container', 'mouseout', outCal);</div>
<div>}</div>
<div>function getDate() {</div>
<div>        var calDate = this.getSelectedDates()[0];</div>
<div>        calDate = (calDate.getMonth() + 1) + '/' + calDate.getDate() + '/' + calDate.getFullYear();</div>
<div>        YAHOO.util.Selector.query('.activeCal')[0].value = calDate;</div>
<div>        over_cal = false;</div>
<div>        hideCal();</div>
<div>}</div>
<div>function showCal(e, targ) {</div>
<div>    var xy = YAHOO.util.Dom.getXY(this);</div>
<div>    var el = new YAHOO.util.Element(this); </div>
<div>    el.addClass('activeCal');</div>
<div>    var date = this.value;</div>
<div>    if (date) {</div>
<div>        cal1.cfg.setProperty('selected', date);</div>
<div>        cal1.cfg.setProperty('pagedate', new Date(date), true);</div>
<div>        cal1.render();</div>
<div>    }</div>
<div>    YAHOO.util.Dom.setStyle('cal1Container', 'display', 'block');</div>
<div>    xy[1] = xy[1] + 20;</div>
<div>    YAHOO.util.Dom.setXY('cal1Container', xy);</div>
<div>}</div>
<div>function hideCal() {</div>
<div>    if (!over_cal) {</div>
<div>         var el = new YAHOO.util.Element(this); </div>
<div>        el.removeClass('activeCal');</div>
<div>        YAHOO.util.Dom.setStyle('cal1Container', 'display', 'none');</div>
<div>    }</div>
<div>}</div>
<div>function overCal() {</div>
<div>    over_cal = true;</div>
<div>}</div>
<div>function outCal() {</div>
<div>    over_cal = false;</div>
<div>}</div>
<div>YAHOO.util.Event.addListener(window, 'load', transmogCals);</div>
<p></code></p>
<p> </p>
<h2>Adding it to your page</h2>
<p>Integrating the code into the page is VERY easy.</p>
<p>In the header of the page add the following css includes.</p>
<pre>&lt;link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.6.0/build/calendar/assets/skins/sam/calendar.css"&gt;</pre>
<div><span>In the footer add the following script include and include the date-picker.js file</span></div>
<div>
<table class="dp-xml" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="line2"><span class="tag">&lt;</span><span>script </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text/javascript&#8221;</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">&#8220;http://yui.yahooapis.com/combo?2.6.0/build/yahoo-dom-event/yahoo-dom-event.js&amp;2.6.0/build/calendar/calendar-min.js&amp;2.6.0/build/selector/selector-beta-min.js&#8221;</span><span>&gt;</span><span class="tag">&lt;/</span><span>script</span><span class="tag">&gt;</span><span> </span></td>
</tr>
</tbody>
<thead></thead>
</table>
</div>
<div>Lastly, place a class of date-picker to any text fields you want to tie to the input and add the following to your pages markup:</div>
<p> </p>
<p><code></p>
<div>&lt;div class='yui-skin-sam' style="position:absolute; left:-1000px;"&gt;</div>
<div>     &lt;div id="cal1Container"&gt;&lt;/div&gt;</div>
<div>   &lt;/div&gt;</div>
<p></code></p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>YUI 2.4 has landed</title>
		<link>http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/</link>
		<comments>http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 15:59:44 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/</guid>
		<description><![CDATA[YUI has announced a major new release with the  immediate availability of YUI 2.4. Key Features: Selector Utility: Following in the footsteps of most other toolkits, YUI now includes a CSS Selector.  This beta component includes much of the standard CSS3 selector syntax including the proposed Selector extensions. Charting: Using a hybrid Flash / Javascript [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>YUI has announced a major new release with the  immediate availability of YUI 2.4.</p>
<p><strong>Key Features:</strong></p>
<ul>
<li><strong>Selector Utility:</strong> Following in the footsteps of most other toolkits, YUI now includes a CSS Selector.  This beta component includes much of the standard CSS3 selector syntax including the proposed Selector extensions.</li>
<li><strong>Charting: </strong>Using a hybrid Flash / Javascript model, a new charting component has been released with support for bar, line and pie charts.  Of special note is the fact that the charting utility utilizes the same data model as the data table implementation allowing hybrid chart / table interfaces.</li>
<li><strong>Get:</strong> dynamically load scripts and nodes via the new Get tools.</li>
<li><strong>Profiler:</strong> This combined with YUI Test will allow you to quickly and efficiently determine profiles and unit tests.  Most notably, profiler allows unit tests based on performance to be performed.</li>
<li><strong>JSON Utility:</strong> dramatically improved JSON support.</li>
</ul>
<p>Behind the scenes:</p>
<p>Incremental improvments to: Calendar, Drag &amp; Drop &amp; Button controls.</p>
<p>Dramatic enhancements &amp; customization support added to the Rich Text Editor:</p>
<p>Read about the release here:</p>
<p><a href="http://yuiblog.com/blog/2007/12/04/yuii-240/">http://yuiblog.com/blog/2007/12/04/yuii-240/</a></p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining Position with YUI</title>
		<link>http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/</link>
		<comments>http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 13:57:23 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[dimensions]]></category>
		<category><![CDATA[Space]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/</guid>
		<description><![CDATA[Today we conclude our series of posts on space &#38; dimension with an exploration of YUI&#8217;s Spacial capabilities. Many of YUI&#8217;s capabilities aren&#8217;t readily apparent from the component level documentation. One exception are the setXY &#38; getXY functions. setXY &#38; getXY operate on the top left corner of an Element relative to the top left [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Today we conclude our series of posts on space &amp; dimension with an exploration of YUI&#8217;s Spacial capabilities.  Many of YUI&#8217;s capabilities aren&#8217;t readily apparent from the component level documentation.  One exception are the setXY &amp; getXY functions.</p>
<ul>
<li>setXY &amp; getXY operate on the top left corner of an Element relative to the top left corner of the document.</li>
<li>A companion getXY is provided with the YUI event object to determine the location of clicks.</li>
</ul>
<p>A look at YUI&#8217;s API&#8217;s reveals a second, powerful class for dealing with 2d space.  The YUI region class is a representation of an object on a grid.  Region provides the top, left, right &amp; bottom locations in a rectangular shape.  Region is not a tool for manipulating the dom, rather it is a utility class for determining the union, intersection, area and other properties of a defined rectangular area.</p>
<p>YUI lacks many of the capabilities for handling scrolls, widths  &amp; heights we&#8217;ve encountered in other toolkits but still provides a reasonably capable set of tools with which to handle locations within a document.</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

