Forum:Wikia is changing javascript frameworks

Hi all,

Over the next few weeks, Wikia will be transitioning from the YUI javascript framework to jQuery. For most everyone, the only thing that this means is that the site should run faster once we're completely done with the process; however, if you have created custom javascript in your MediaWiki:Common.js or MediaWiki:Monaco.js that relies on YUI, you may need to update the code to ensure that it continues to function properly. Here is an email that Christian sent to the wikia-tech-l mailing list regarding the change: Jesús and all,

Sorry for the delay in communicating this change. We've been heads-down on optimization work all week and are just now coming up for air. Here's the full story:

Several months ago, we added jQuery into the mix with YUI, mostly for its more accurate offset function. Some of our YUI features had already been written with $ as an alias for YUI's get function, so we worked jQuery around that fact. Now, it doesn't make a ton of sense to employ two javascript frameworks, so we had to make a choice. After evaluating Dojo Toolkit, MooTools, YUI 3, and jQuery 1.3, we've decided to transition Wikia's frontend to jQuery. We'll do this in a couple of stages.

On May 13, as Jesús noted, the $ variable will an alias for jQuery. We'll still continue to load YUI, so no transition from YUI to jQuery is necessary for now. If you have any scripts that use $ for YUI's get, changing the alias is pretty easy: $("some_element") becomes: YAHOO.util.Dom.get("some_element") In the same release, jQuery will also be updated to 1.3.

On June 3rd, the first phase of the "Lean Monaco" optimization project is scheduled to be released. At that time, YUI will not be loaded on article pages, but will still be loaded on edit pages. All of Wikia's extensions that are used on article pages will have been optimized and transitioned to use jQuery. If any of you use scripts that are dependent on YUI, and you haven't transitioned them to jQuery, you can always include a Yahoo-hosted build of YUI via MediaWiki:Monaco.js. Yahoo-hosted scripts can be configured here: http://developer.yahoo.com/yui/articles/hosting/

After the first phase, the second phase of our front end transition will completely remove YUI from the site, leaving jQuery as the sole javascript framework. We haven't yet met to discuss the timing for the second phase, but we'll keep Wikia-tech-l posted on the plan.

-Christian If your wiki has code that might be affected by this change, please subscribe to the wikia-tech-l mailing list for future updates.

Thanks! --KyleH (talk) 23:03, 11 May 2009 (UTC)
 * KyleH i would suggest the potential benefit of using the wikia talk msg feature to inform this to every body more effectively --