Free Sample
+ Collection

YUI 2.8: Learning the Library

Daniel Barreiro, 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 139781849510707
Paperback404 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: Getting Started with 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 normalization 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
The Selector Utility
Listening for Events the easy (YUI) way
Event models
YUI event capturing
A look at the Event Utility
Custom events
The Element Utility
Chapter 4: Calling Back Home
Introduction to Connection Manager
The XMLHttpRequest object interface
A closer look at the response object
The Callback object
Basic communication
Yahoo Query Language (YQL)
Chapter 5: Animation, the Browser History Manager, and Cookies
Introducing the Animation Utility
Using Animation to create an Accordion Widget
Restoring the browser's expected functionality
Chapter 6: Content Containers and Tabs
Meet the YUI Container family
Creating a Panel
Before we go on
Working with Dialogs
An "Are you sure?" SimpleDialog
Easy Tooltips
The YUI TabView Control
Adding tabs
Chapter 7: Menus
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
Chapter 8: 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
Planting the seed
Chapter 9: DataSource and AutoComplete
Tabular data sources
Look ahead with the AutoComplete Control
Implementing AutoComplete
Chapter 10: DataTable
DataTable dependencies
DataTable classes
Creating a DataTable
Chapter 11: Rich Text Editor
The two editors
A simple e-mail editor
Chapter 12: Drag-and-Drop with the YUI
Dynamic drag-and-drop without the hassle
DragDrop classes
Implementing drag-and-drop
Visual selection with the slider control
A very simple slider
The Resize utility
The Layout Manager
Chapter 13: Everyday Tools
Lint-free code
The Logger
Watching bits go by
Seeking performance
YUI Testing

What You Will Learn

  • Explore the YUI Library's 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
  • Use rich user interface controls
  • Communicate with external sources of data
  • Debug, maintain, and update applications

Examples included in the book:

  • Calendar interface
  • Autocomplete
  • Creating panels
  • Dialogs
  • Custom tooltips
  • Forms
  • Split button
  • TreeView Control
  • Browser History Manager with Calendar
  • Simple and custom animations
  • Creating tabs and adding content dynamically
  • Dragging and dropping
  • Implementing sliders
  • DataTable Control
  • Rich Text Editor
  • Creating Menus
  • Creating custom controls with Element
  • Connecting with web services and other sources


In Detail

The YUI Library is a set of utilities and controls written in JavaScript for building Rich Internet Applications, across all major browsers and independently of any server technology. There's a lot of functionality baked into YUI, but getting to and understanding that functionality is not for the faint of heart. This book gives you a clear picture of YUI through a step-by-step approach, packed with lots of examples.

YUI 2.8: Learning the Library covers all released (non-beta) components of the YUI 2.8 Library in detail with plenty of working examples, looking at the classes that make up each component and the properties and methods that can be used. It includes a series of practical examples to reinforce how each component should/can be used, showing its use to create complex, fully featured, cross-browser, Web 2.0 user interfaces. It has been updated from its first edition with the addition of several chapters covering several new controls and enriched with lots of experience of using them.

You will learn to create a number of powerful JavaScript controls that can be used straightaway in your own applications. Besides giving you a deep understanding 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. The final chapter describes many of the tools available to assist you the developer in debugging, maintaining, and ensuring the best quality in your code.

In this new edition, all the examples have been updated to use the most recent coding practices and style and new ones added to cover newer components. Since the basic documentation for the library is available online, the focus is on providing insight and experience.

The authors take the reader from beginner to advanced-level YUI usage and understanding.


Read More

Recommended for You

Learning the Yahoo! User Interface library
$ 16.20
Web Application Development with Yii 2 and PHP
$ 21.99
Instant Yii 1.1 Application Development Starter
$ 12.99