Book description
Solve a wide range of problems in your web application quickly and efficiently with the Yahoo! User Interface Library (YUI). With this definitive, getting-started guide to version 3 of the popular open source JavaScript library, you’ll learn how to address many of the most common and challenging problems that web development presents.
Table of contents
- YUI 3 Cookbook
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Preface
-
1. Loading Modules
- Loading Rollups and Modules
- Loading SimpleYUI
- Identifying and Loading Individual Modules
- Loading a Different Default Skin
- Loading Gallery Modules
- Loading a YUI 2 Widget
- Loading Locally Hosted Builds
- Creating Your Own Modules
- Creating a Module with Dependencies
- Creating Truly Reusable Modules
- Defining Groups of Custom Modules
- Reusing a YUI Configuration
- Defining Your Own Rollups
- Loading jQuery as a YUI Module
- Loading Modules Based on Browser Capabilities
- Monkeypatching YUI
- Loading Modules on Demand
- Enabling Predictive Module Loading on User Interaction
- Binding a YUI Instance to an iframe
- Implementing Static Loading
- 2. DOM Manipulation
- 3. UI Effects and Interactions
-
4. Events
- Responding to Mouseovers, Clicks, and Other User Actions
- Responding to Element and Page Lifecycle Events
- Controlling Event Propagation and Bubbling
- Preventing Default Behavior
- Delegating Events
- Firing and Capturing Custom Events
- Driving Applications with Custom Events
- Using Object Methods as Event Handlers
- Detaching Event Subscriptions
- Controlling the Order of Event Handler Execution
- Creating Synthetic DOM Events
- Responding to a Method Call with Another Method
-
5. Ajax
- Fetching and Displaying XHR Data
- Handling Errors During Data Transport
- Loading Content Directly into a Node
- Submitting Form Data with XHR
- Uploading a File with XHR
- Getting JSON Data Using Script Nodes (JSONP)
- Fetching and Displaying Data with YQL
- Scraping HTML with YQL
- Querying Data Using DataSource
- Normalizing DataSource Responses with a DataSchema
- 6. CSS
-
7. Infrastructure
- Managing State with Attributes
- Creating Base Components with Y.extend()
- Creating Base Components with Y.Base.create()
- Creating a Basic Widget
- Creating a Widget That Uses Progressive Enhancement
- Rendering Remote Data with a Widget
- Creating a Simple Plugin
- Creating a Plugin That Alters Host Behavior
- Bundling CSS with a Widget as a CSS Module
- Bundling CSS with a Widget as a Skin
- Representing Data with a Model
- Persisting Model Data with a Sync Layer
- Managing Models with a Syncing ModelList
- Rendering HTML with a View
- Rendering a Model with a View
- Rendering a ModelList with a View
- Saving State Changes in the URL
- Defining and Executing Routes
-
8. Using Widgets
- Instantiating, Rendering, and Configuring Widgets
- Creating an Overlay
- Aligning and Centering an Overlay
- Making an Overlay Draggable
- Creating a Simple, Styled Information Panel
- Creating a Modal Dialog or Form
- Creating a Tooltip from an Overlay
- Creating a Lightbox from an Overlay
- Creating a Slider
- Creating a Tabview
- Creating a Basic DataTable
- Formatting a DataTable’s Appearance
- Displaying a Remote JSON DataSource in a DataTable
- Plotting Data in a Chart
- Choosing Dates with a Calendar
- Defining Calendar Rules
- Creating a Basic AutoComplete
- Highlighting and Filtering AutoComplete Results
- Using AutoComplete with Remote Data
- Customizing the AutoComplete Result List
-
9. Utilities
- Determining a Variable’s Type
- Iterating Over Arrays and Objects
- Filtering an Array
- Merging Objects
- Composing and Inheriting from Other Objects
- Automatically Caching Function Call Results
- Templating with Simple String Substitution
- Formatting Numbers
- Formatting Dates
- Parsing Arbitrary XML
- Converting Color Values
- Managing History and the Back Button
- Escaping User Input
- Assigning Special Behavior to a Checkbox Group
- Implementing Easy Keyboard Actions and Navigation
- Reliably Detecting Input Field Changes
- Managing and Validating Forms
- 10. Server-Side YUI
- 11. Universal Access
-
12. Professional Tools
- Enabling Debug Logging
- Rendering Debug Log Output in the Page
- Writing Unit Tests
- Organizing Unit Tests into Suites
- Testing Event Handlers by Simulating Events
- Mocking Objects
- Testing Asynchronously Using wait()
- Collecting and Posting Test Results
- Precommit Testing in Multiple Browsers
- Testing on Mobile Devices
- Testing Server-Side JavaScript
- Minifying Your Code
- Documenting Your Code
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Copyright
Product information
- Title: YUI 3 Cookbook
- Author(s):
- Release date: June 2012
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449304195
You might also like
book
Rails Cookbook
Rails Cookbook is packed with the solutions you need to be aproficient developer with Rails, the …
book
jQuery and JavaScript Phrasebook
Get more done faster with jQuery and JavaScript! Brad Dayley’s jQuery and JavaScript Phrasebook brings together …
book
Cascading Style Sheets (CSS) by Example
Cascading Style Sheets (CSS) by Example allows you to learn the fundamentals of CSS by taking …
book
Ajax: The Definitive Guide
Is Ajax a new technology, or the same old stuff web developers have been using for …