Free Sample
+ Collection

Learning the Yahoo! User Interface library

Dan Wellman

Develop your next generation web applications with the YUI JavaScript development library
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847192325
Paperback380 pages

About This Book

  • Improve your coding and productivity with the YUI Library
  • Gain a thorough understanding of the YUI tools
  • Learn from detailed examples for common tasks

Who This Book Is For

This book is for web developers comfortable with JavaScript and CSS, who want to use the YUI library to easily put together rich, responsive web interfaces. No knowledge of the YUI library is presumed.

Table of Contents

Chapter 1: Introducing the YUI
What is the YUI?
What Comes with the YUI?
Installing the YUI
Using the Library Files in Your Own Web Pages
Code Placement
Perfect Date Selection with the Calendar Control
Implementing a Calendar
Chapter 2: Creating Consistency With The CSS Tools
Tools of the Trade
Element Normalisation with reset.css
First Base
Tidying up Text with fonts.css
Layout Pages with Ease Using grids.css
A Word on Sam
Chapter 3: DOM Manipulation and Event Handling
Working with the DOM
Common DOM Scripting Techniques
DOM Manipulation in YUI
Listening for Events the Easy (YUI) Way
Event Models
YUI Event Capturing
A Look at the Event Class
Custom Events
Creating a Custom Event
Chapter 4: AJAX and Connection Manager
The Connection Manager—A Special Introduction
The XMLHttpRequest Object Interface
A Closer Look at the Response Object
Managing the Response with a Callback Object
Working with responseXML
Useful Connection Methods
A Login System Fronted by YUI
Chapter 5: Animation and the Browser History Manager
Introducing the Animation Utility
Using Animation to Create an Accordion Widget
Restoring the Browser's Expected Functionality
Using BHM
Chapter 6: Buttons and Trees
Why Use the YUI Button Family?
Meet the Button Control
Using the Button Control
Using the Split Button Type
Tree-like Structures with the TreeView Control
Class of Nine
Implementing a Tree
Chapter 7: Navigation and AutoComplete
Common Navigation Structures
Instant Menus—Just Add Water (or a Menu Control)
The Menu Classes
Creating a Basic Navigation Menu
Using the ContextMenu
The Application-style MenuBar
Look Ahead with the AutoComplete Control
Implementing AutoComplete
Working With Other DataSources
Chapter 8: Content Containers and Tabs
Meet the YUI Container Family
Creating a Panel
Working with Dialogs
A Quick SimpleDialog
Easy Tooltips
The YUI TabView Control
Adding Tabs
Chapter 9: Drag-and-Drop with the YUI
Dynamic Drag-and-Drop without the Hassle
The Different Components of Drag-and-Drop
DragDrop Classes
Implementing Drag-and-Drop
Visual Selection with the Slider Control
A Very Simple Slider
Chapter 10: Advanced Debugging with Logger
The Purpose of Logger
The Purpose of the —debug Library Files
How the Logger Can Help You
The Logger Classes
How to Use Logger
Component Debugging with Logger
Logging with a Custom Class

What You Will Learn

  • Explore the YUI Library—utilities, controls, core files, and CSS tools
  • Install the library and get up and running with it
  • Handle DOM manipulation and scripting
  • Get inside Event Handling with YUI
  • Create consistent web pages using YUI CSS tools
  • Work with Containers—implementation, skinning, adding transitions, and tabs
  • Debug, maintain, and update applications with the Logger control
  • Examples included in the book:
  •     Calendar interface
  •     Autocomplete
  •     Creating panels
  •     Dialogs
  •     Custom tooltips
  •     Forms
  •     Split button
  •     TreeView Control
  •     Browser History Manager with Calendar
  •     Simple animation
  •     Custom animation
  •     Creating tabs and adding content dynamically
  •     Dragging and dropping
  •     Implementing sliders
  •     Logger at work
  •     Logging custom classes

In Detail

The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML, and AJAX. The YUI Library also includes several core CSS resources. All components in the YUI Library have been released as open source under a BSD license and are free for all uses.

This book covers all released components whether utility, control, core file, or CSS tool.  Methods of the YAHOO Global Object are used and discussed throughout the book.
The basics of each control will be presented, along with a detailed example showing its use to create complex, fully featured, cross-browser, Web 2.0 user interfaces.

Besides giving you a deep understand of the YUI library, this book will expand your knowledge of object-oriented JavaScript programming, as well as strengthen your understanding of the DOM and CSS.

You will learn to create a number of powerful JavaScript controls that can be used straight away in your own applications.


Read More

Recommended for You