Product Overview
The Art & Science of JavaScript
Table Of Contents
- Here’s a look at the table of contents:
- Preface
- Who Should Read This Book?
- What’s Covered in This Book?
- The Book’s Web Site
- The Code Archive
- Updates and Errata
- The SitePoint Forums
- The SitePoint Newsletters
- Your Feedback
- Conventions Used in This Book
- Code Samples
- Tips, Notes, and Warnings
- 1. Fun with Tables
- Anatomy of a Table
- Accessing Table Elements with getElementById
- Accessing Table Elements with
getElementsByTagName
- Sortable Columns
- Making Our Tables Sortable
- Performing the Sort
- Creating Draggable Columns
- Making the Table’s Columns Draggable
- Dragging Columns without a Mouse
- Summary
- Anatomy of a Table
- 2. Creating Client-side Badges
- Badges—an Introduction
- Too Many Badges Spoil the Broth
- Out-of-the-box Badges
- Server-side Badges
- Custom Client-side Badges
- Client-side Badge Options: Ajax and JSON
- The Problem with Ajax
- JSON: the Lightweight Native Data Format
- Providing a Fallback for Failed Connections
- Planning the Badge Script
- The Complete Badge Script
- Defining Configuration Variables
- Defining Public Methods
- Defining Private Methods
- Calling for Server Backup
- Summary
- Badges—an Introduction
- 3. Vector Graphics with canvas
- Working with canvas
- The
canvasAPI - Thinking About Vector Graphics
- Creating Shapes
- The
- Creating a Pie Chart
- Drawing the Chart
- Casting a Shadow
- Updating the Chart Dynamically
canvasin Internet Explorer- Summary
- Working with canvas
- 4. Debugging and Profiling with Firebug
- Installing and Running Firebug
- Installing Firefox and Firebug
- First Steps with Firebug
- Opening, Closing, and Resizing Firebug
- Enabling and Disabling Firebug
- The Many Faces of Firebug
- Common Components
- The Firebug Views
- Switching Views
- Using Firebug
- Performing Rapid Application Development
- Monitoring, Logging, and Executing with the Console
- Viewing and Editing On the Fly
- Debugging Your Application
- Performance Tuning Your Application
- Related Tools
- Firebug Lite
- YSlow
- Microsoft Tools
- Other Firefox Extensions
- Summary
- Installing and Running Firebug
- 5. Metaprogramming with JavaScript
- The Building Blocks
- (Nearly) Everything Is a Hash
- Finding and Iterating through Properties in an Object
- Detecting Types
- There Are No Classes in JavaScript
- Detecting whether a Function Was Called with new
- Functions Are Objects
- Understanding the
argumentsArray - Comprehending Closures
- Metaprogramming Techniques
- Creating Functions with Default Arguments
- Working with Built-ins
- Creating Self-optimizing Functions
- Aspect-oriented Programming on a Shoestring
- Better APIs through Dynamic Functions
- Creating Dynamic Constructors
- Simulating Traditional Object Orientation
- Summary
- The Building Blocks
- 6. Building a 3D Maze with CSS and JavaScript
- Basic Principles
- Making Triangles
- Defining the Floor Plan
- Creating Perspective
- Making a Dynamic View
- Core Methods
- Applying the Finishing Touches
- Limitations of This Approach
- Creating the Map View
- Adding Captions
- Designing a Floor Plan
- Further Developments
- Using the Callback
- Blue-sky Possibilities
- Summary
- Basic Principles
- 7. Flickr and Google Maps Mashups
- APIs, Mashups, and Widgets! Oh, My!
- Flickr and Google Maps
- Drawing a Map
- Geotagging Photos
- Getting at the Data
- JSON
- The Same-origin Restriction
- Pulling it All Together
- Enhancing Our Widget
- Putting it All Together
- Taking Things Further
- Summary
- APIs, Mashups, and Widgets! Oh, My!
- Index




