by Narayanan A.R.
Mar 17, 2009
Page 1 of 3
The next two articles in the series will cover the following:
Containers, layouts, widgets, event handling, AJAX components, and server-side interaction
DataTable, pagination, sorting, JSON, and error handling
YUI Under the Hood
Essentially, the YUI library is a collection of components that address various aspects of a web application. They broadly fall into the following categories:
Container components such as Panel, Tooltip, Dialog, etc.
UI widgets such as Button, Calendar, DataTable, Menu, Paginator, Rich Text Editor, etc.
Components for interacting with server-side modules
Components for dealing with DOM and Event handling
Components for managing animation, drag and drop, page layout, etc.
The YUI source code comes in three forms for every component, which is handy for debugging any problem unique to your application:
Standard form: You can use this form to understand the implementation of a component.
Debug enabled: This form prints debug information.
Compressed: This form has white spaces removed to improve download performance.
If you fail to prefix a local variable with the var keyword in a function during declaration, the value is retained outside the function scope. This makes determining what went wrong difficult.
Do not suffix the function name with open and closed parentheses when passing a reference to the function. This will actually invoke the function.
The column width you pass in to the DataTable component differs between IE and Firefox. Set the column width 20 pixels smaller in Firefox than in IE.