Updated YUI3 for YUI2


For those of you who are using my YUI 3 for YUI 2 emulation code, I want to share with you the latest, and perhaps final version. This version is very similar to what we are now using on Mint.com, where I have been successfully swapping back and forth between the mock YUI 3 and the real YUI 3.

http://yui-ext-mvc.googlecode.com/svn/trunk/assets/js/yahoo-ext/yui3foryui2.js

Notes

  • Y.Base.create has been added
  • use YUI.add instead of YUI().add
  • Y.NodeList is now supported
  • Y.Event.attach and Y.Event.detach emulated
  • window resize event supported
  • the Y.mix function is fully emulated

There is definitely more, but the above is a good list of the major improvements.

Web Development News August 2010 B


Here are some interesting articles from the first half of August:

continue reading article…

Adding Find() to NodeList in YUI3


In YUI 3, when searching an array for a value, you have to include the collection module, as the Y.Array.find() function is not built into Y.Array. This is a little annoying, because 9 out of 10 times, I include the collection module, it is just for the Y.Array.find() function. Additionally, because the function isn't built into the core library, it is not used or added to the core features, like NodeList. Yet, I believe having a find() function on NodeList is very useful and this article provides a simply way to augment NodeList.

continue reading article…

Web Development News August 2010 A


Not a whole lot of news this week, which is great because I had surgery on my left hand and typing one handed is a pain. Besides the articles included here, there was a lot of talk on whether to HTML validate your code or not. I'd say the general consensus was no, because of lack of ARIA support and the inability to add meta attributes. All browsers support meta-attributes, even if they aren't in the DTD and it is a better way to send data than hijacking existing attributes.

Here are some interesting articles from the first half of August:

continue reading article…

Clientside Moment Profiling


When developing complex JavaScript applications, it is useful to profile the loading of your pages, so you can better understand the bottlenecks of performance. To the end user, the most important moment is when the browser indicates that the page is finished loading. As developers, it is our job to understand why loading takes so long and how to improve it. Today's article will introduce a simple widget called MomentTracker, which allows you to easily compile a collection of important client-side moments and then output them.

continue reading article…