YUI Project
Notes on an OpenACS wrapper for YUI
- There is some consensus to use YUI over other JS libraries, e.g. jQuery.
- Use most complete version - YUI library
- YUI Loader for dynamic loading. Each wrapper function in OpenACS loads only the YUI components that it needs. This is preferable to sending the full 250 KB gzipped library for every page.
- Download YUI sources from package directory or Yahoo's CDN.
- Always combine sources into one HTTP download if using CDN
- UI tests (Selenium IDE/RC) should be written for all wrappers to facilitate testing during development and when YUI is upgraded.
- Wrappers will be defined by specific tasks like perform an AJAX request and return the response into a div. The wrapper will take care of loading all required sources into the page.
YUI Theme [Suggestion]
- Provide a package openacs-theme-yui, which is based on the YUI CSS Foundation
nlunt: A word of warning regarding YUI Loader:
While it sounds like a good idea to load only the modules that are needed, my experience has shown that there may be more benefit to loading a single gzipped file for the javascript and css portions of YUI for a total of 250K that is cached after the first load. This sounds like a lot to load for every page, however, loading just the base modules of YUI may exceed that amount because the individual JavaScript and css files for each module are not gzipped. Loading all of YUI uncompressed is about 1M, so there is considerable benefit in loading the files compressed.