Yahoo User Interface YUI Library Natly Mekdara Introduction
Yahoo! User Interface (YUI) Library Natly Mekdara
Introduction A set of utilities and controls, written in Java. Script, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. - The library was developed by Yahoo!’s client-side platform engineering team. -
Introduction n The library is divided into two logical sections: – Utilities § Reusable infrastructure libraries that handle things like events, AJAX calls, animation and drag & drop – Controls § Reusable interactive components, like sliders, menus, and calendars, that are built using the utility libraries
Library Components UTILITIES -Animation -Drag & drop -Dom -Event -Connection Manager -Browser History Manager -Connection Manager -Data. Source Utility CONTROLS -Autocomplete -Menu -Slider -Calendar -Container -Treeview -Button Control -Data. Table Control -Logger -Tab. View
YUI CSS Resources n CSS Grids n CSS Fonts n CSS Reset
UTILITIES: Animation n Create effects on pages by animating the position, size, opacity or other characteristics of page elements. These effects can be used to reinforce the user's understanding of changes happening on the page. n Example: http: //developer. yahoo. com/yui/examples/ animation/motion_plus. html
UTILITIES: Drag & drop n Create draggable objects that can be picked up and dropped elsewhere on the page. n The utility keeps things working smoothly in all supported browsers. n Example: http: //developer. yahoo. com/yui/examples/ dragdrop/list. html? mode=dist
UTILITIES: Dom Collection n The Dom Collection comprises a family of convenience methods that simplify common DOM-scripting tasks, including element positioning and CSS style management, while normalizing for crossbrowser inconsistencies. n Example: http: //developer. yahoo. com/yui/examples/ dom/setxy. html
UTILITIES: Event This manager class gives you easy and safe access to browser events (such as clicks and key presses). n The Event package also includes the Custom Event object, a mechanism for publishing and subscribing to interesting moments in your own application flow. n Example: http: //developer. yahoo. com/yui/examples/event-delegation. html n
UTILITIES: Connection Manager This utility library helps manage XMLHttp. Request (commonly referred to as AJAX) transactions in a cross-browser fashion, including integrated support form posts, error handling and callbacks. n Connection Manager also supports file uploading. n Example: http: //developer. yahoo. com/yui/examples/conne ction/weather. html n
CONTROL: Autocomplete The Auto. Complete Control allows you to streamline user interactions involving text-entry. n The control provides suggestion lists and typeahead functionality based on a variety of datasource formats and supports server-side datasources via XMLHttp. Request. n Example: http: //developer. yahoo. com/yui/examples/autoc omplete/ysearch_xml. html n
CONTROL: Slider The Slider component is a UI control that enables the user to adjust values in a finite range along one or two axes. n Typically, the Slider control is used in a web application as a rich, visual replacement for an input box that takes a number as input. n Example: http: //developer. yahoo. com/yui/examples/slider/ rgb. html? mode=dist n
CONTROL: Button The Button Control provides checkbox, radio button, submit and menu-button UI elements that are more impact visually and more powerful programmatically than the browser's built-in form widgets. n The Button Control enables the creation of rich, graphical buttons that function like traditional HTML form buttons. n Unlike traditional HTML form buttons, buttons created with the Button Control can have labels that are different from their value. n Example: http: //developer. yahoo. com/yui/examples/button/examp le 02. html n
CONTROL: Menu Application-style fly-out menus require just a few lines of code with the Menu Control. Menus can be generated entirely in Java. Script or can be layered on top of semantic unordered lists. n The Menu family of components features a collection of controls that make it easy to add menus to your website or web application. n Example: http: //developer. yahoo. com/yui/examples/menu /programsmenu. html n
CONTROL: Tree. View The Tree. View control produces a content tree whose nodes can be expanded and contracted by user interaction (and by script, where necessary). n The nodes can contain links or custom properties and can be loaded dynamically. n The display of the node elements can be customized with CSS to create a folder view, todo task list, or other visual treatment. n Example: http: //developer. yahoo. com/yui/examples/treevi ew/html? mode=dist n
Resources n http: //developer. yahoo. com/yui/
- Slides: 16