Yahoo User Interface Library 2.x Cookbook


Yahoo User Interface Library 2.x Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
 
  • Easily develop feature-rich internet applications to interact with the user using various built-in components of YUI library
  • Simple and powerful recipes explaining how to use and implement YUI 2.x components
  • Gain a thorough understanding of the YUI tools
  • Plenty of example code to help you improve your coding and productivity with the YUI Library
  • Hands-on solutions that takes a practical approach to recipes

Book Details

Language : English
Paperback : 436 pages [ 235mm x 191mm ]
Release Date : January 2011
ISBN : 1849511624
ISBN 13 : 9781849511629
Author(s) : Matt Snider
Topics and Technologies : All Books, Web Development, AJAX, Cookbooks, Java, Open Source, Web Development

Table of Contents

Preface
Chapter 1: USING YUI 2.x
Chapter 2: Using DOM and Selector Components
Chapter 3: Using Event Component
Chapter 4: Using Connection Component
Chapter 5: Using DataSource Component
Chapter 6: Using Logger and YUI Test Components
Chapter 7: Using Element and Button Components
Chapter 8: Using Menu Component
Chapter 9: Using Animation Component
Chapter 10: Using Drag and Drop Component
Chapter 11: Using Container Component
Chapter 12: Using DataTable Component
Chapter 13: Using TreeView Component
Chapter 14: Other Useful Components
Chapter 15: Some Interesting Beta Components
Index
  • Chapter 1: USING YUI 2.x
    • Introduction
    • Fetching the latest version of YUI 2.x
    • Letting YDN manage YUI dependencies dynamically
    • Configuring the YUILoader component
    • Letting YUI manage My Script dependencies
    • Importing JavaScript and CSS with the Get component
    • Configuring the Get component
    • Building namespaces
    • Including YUI CSS
    • Evaluating object types, the YUI way
    • Using hasOwnProperty to fix for...in loops
    • Extending JavaScript objects, the YUI way
    • Augmenting objects using YUI
    • Detecting client browser and platforms
    • Using the Cookie component
    • Using the JSON package
    • Chapter 2: Using DOM and Selector Components
      • Introduction
      • Searching the document
      • Searching for element children and siblings
      • Searching for element ancestors
      • Working with HTML classes
      • Modifying element styles and HTML attributes
      • Element positions and sizes
      • Using and comparing regions
      • Using advanced DOM functions
      • Using Selector to search the DOM
      • Using CSS 2 and 3 Selectors with YUI
      • Filtering and testing nodes using selector
      • Chapter 3: Using Event Component
        • Introduction
        • Using YUI to attach JavaScript event listeners
        • Event normalization functions
        • Removing event listeners
        • Listening for key events
        • Using special YUI only events
        • Using YUI helper event functions
        • Using custom events
        • The simple way to add custom events to classes
        • Chapter 4: Using Connection Component
          • Introduction
          • Making your first AJAX request
          • Exploring the callback object properties
          • Exploring the response object properties
          • Handling event callback functions
          • Subscribe to connection events globally
          • Uploading files using Connection Manager
          • Making cross-domain AJAX requests
          • Other useful Connection Manager static function
          • Putting it all together
          • Chapter 5: Using DataSource Component
            • Introduction
            • Simple examples of each DataSource type
            • Using the JavaScript array response type
            • Using the JSON response type
            • Using the XML ResponseType
            • Using the text response type
            • Using the HTML table response type
            • Exploring advanced DataSource features
            • Chapter 6: Using Logger and YUI Test Components
              • Introduction
              • Writing your first log statement
              • Exploring the Logger component
              • Configuring and using the LogReader class
              • Using the LogWriter component
              • Writing your first test case
              • How to use assertions
              • Simulating user actions in your tests
              • Using TestSuite to manage TestCases
              • Using TestRunner to run tests
              • Chapter 7: Using Element and Button Components
                • Introduction
                • Creating your first element object
                • Subscribing to events on element objects
                • Using AttributeProvider to attributes for classes
                • Manipulating the DOM using element objects
                • Creating your first button object
                • Using ButtonGroups to control related buttons
                • Using events with button and ButtonGroup objects
                • Chapter 8: Using Menu Component
                  • Introduction
                  • Creating your first Menu object
                  • Grouping related MenuItems
                  • Adding Submenus to your Menus
                  • Traversing a Menu instance
                  • Adding help text to your MenuItems
                  • Configuring Menu and MenuItem instances
                  • Subscribing to events on Menu objects
                  • Using the ContextMenu Menu object
                  • Using the MenuBar Menu object
                  • Control a Menu using a Button object
                  • Chapter 9: Using Animation Component
                    • Introduction
                    • Creating your first animation
                    • Exploring the animation attributes
                    • Using and writing easing functions
                    • Subscribing to animation events
                    • Animating colors
                    • Animating with motion
                    • Animating an element's scroll offset
                    • Chapter 10: Using Drag and Drop Component
                      • Introduction
                      • Creating your first Drag and Drop element
                      • Configuring and using Drag and Drop manager
                      • Handling Drag and Drop events between DD and DDTarget objects
                      • Limiting Drag and Drop interactions by grouping instances
                      • Constrain drag elements within a region
                      • Using drag handles
                      • Limit the drag element regions for dragging
                      • Chapter 11: Using Container Component
                        • Introduction
                        • Using Module, the foundation for all containers
                        • Exploring Overlay, a foundation for all positioned containers
                        • Creating a JavaScript driven tooltip
                        • Exploring the Panel infrastructure
                        • Show on-demand forms with dialog
                        • Replace browser dialogs with SimpleDialog
                        • Adding animation effects to your containers
                        • Chapter 12: Using DataTable Component
                          • Introduction
                          • Creating a simple DataTable
                          • Defining DataTable columns
                          • Custom cell formatting
                          • Manipulating columns and rows
                          • Sorting your DataTable
                          • Paginating your DataTable
                          • Scrolling your DataTable
                          • Selecting rows, columns, and cells
                          • Inline cell editing
                          • Retrieving remote data for DataTable
                          • Chapter 13: Using TreeView Component
                            • Introduction
                            • Creating a simple TreeView
                            • Defining node definitions
                            • Navigating and searching the tree
                            • Adding and removing nodes
                            • Animating TreeView expand and collapse
                            • Editing the content of a node
                            • Handling TreeView events
                            • Working with dynamic data
                            • Creating custom node types
                            • Chapter 14: Other Useful Components
                              • Introduction
                              • Using the Autocomplete component
                              • Using the Calendar component
                              • Using the History component
                              • Using the Resize component
                              • Using the Slider component
                              • Using the TabView component
                              • Chapter 15: Some Interesting Beta Components
                                • Introduction
                                • Using the SWF component
                                • Using the SWFStore component
                                • Using the Storage component
                                • Using the StyleSheet component
                                • Using the Charts component
                                • Using the Uploader component

                                Matt Snider

                                Matt Snider is a software engineer and JavaScript enthusiast. He has built various web applications from the ground up, since 2003, but has maintained a passion for the UI. He quickly discovered YUI because of its early adoption, great documentation, and strong open-source community. Matt currently maintains a blog dedicated to web application development, leads the UI team at http://www.mint.com, and authored the YUI 2.x Storage Component. In the near future, he plans to port the Storage component to YUI 3. Examples of his work can be found on his personal website http://www.mattsnider.com.

                                Code Downloads

                                Download the code and support files for this book.


                                Submit Errata

                                Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

                                Sample chapters

                                You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                                Frequently bought together

                                Yahoo User Interface Library 2.x Cookbook +    Drools JBoss Rules 5.0 Developer's Guide =
                                50% Off
                                the second eBook
                                Price for both: $36.00

                                Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                                What you will learn from this book

                                • Understand how YUI 2.x works and what features are available
                                • Understand how YUI components interact with the DOM, and why
                                • Effortlessly search the DOM and listen for end-user events
                                • Simplify retrieving server-side data using AJAX and DataSource
                                • Learn how to load your scripts and CSS on demand
                                • Create sophisticated HTML-based panels, tooltips, and dialogs
                                • Make interactive inputs with AutoComplete
                                • Harness the power of drag and drop for your UI
                                • Build sortable, dynamic tables using DataTable
                                • Design richer user interfaces using YUI buttons and menus
                                • Show data hierarchies using the TreeView
                                • Explore some of the more recent beta components
                                • Take control of your UI as you master YUI 2.x

                                 

                                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. Although you can create stylish Internet applications by modifying its default components, even advanced users find it challenging to create impressive feature-rich Internet applications using YUI.

                                This book will help you learn how to use YUI 2.x to build richer, more interactive web applications that impress clients and wow your friends. It has recipes explaining over twenty-five YUI components, showing how to use them, and how to configure them to meet your needs. Each covered component will have extractable code samples that showcase the common ways that the component is used.

                                The book starts by explaining the core features of YUI 2.x, the utilities that the rest of the library depends on and that will make your life easier. It then explains how to build UI components and make AJAX requests using the YUI framework. Each recipe will cover the most common ways to use a component, how to configure it, and then explain any other features that may be available. We wrap things up by looking at some of the recent beta components and explain how to use them, and how they may be useful on your web application.

                                For each of the recipes, there is an introductory example, then more advanced examples, followed by an explanation of how the component works and what YUI is doing. For more experienced developers, most recipes also include additional discussion of the solution, explaining to further customize and enhance the component.

                                This practical book, packed with easy-to-follow recipes, will help you create modern rich internet applications using the most powerful components of Yahoo! User Interface Library (YUI)

                                Approach

                                This book contains recipes that showcase the common components of YUI, providing suggested examples of use, and a detailed explanation. Except for the first three chapters, which cover the 3 components of YUI that form the foundation for all other components, this book is not meant to be read cover-to-cover. Each recipe is presented as a separate, standalone entity and reading of other prior recipes is not required. Each chapter tackles a particular component or set of related components, introducing the component and explaining how to use it.

                                Who this book is for

                                If you are a web application developer and have some prior experience with or interest in using YUI 2.x to improve the UI of their web applications, then this book is for you. It assumes the reader has prior knowledge of JavaScript, HTML, CSS, and basic understanding of how a website works. This book provides an easy-to-use guide for implementing YUI 2.x components, and does not require an expertise in either JavaScript or YUI.

                                Code Download and Errata
                                Packt Anytime, Anywhere
                                Register Books
                                Print Upgrades
                                eBook Downloads
                                Video Support
                                Contact Us
                                Awards Voting Nominations Previous Winners
                                Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                                Resources
                                Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software