Prototype and Scriptaculous in Action

Dave Crane, Bear Bibeault, Tom Locke

  • 出版商: Manning
  • 出版日期: 2007-03-31
  • 定價: $1,575
  • 售價: 5.0$788
  • 語言: 英文
  • 頁數: 544
  • 裝訂: Paperback
  • ISBN: 1933988037
  • ISBN-13: 9781933988030
  • 立即出貨(限量) (庫存=3)





“Shows how Prototype and Scriptaculous let you concentrate on whats important: implementing your ideas.”
 —Thomas Fuchs, Creator of Scriptaculous, from the Foreword

“Of all the books on my shelf, this is the one I go to the most.”
 —Philip Hallstrom,

“Simplifies Ajax development—a great reference.”
 —Mark Eagle, MATRIX Resources, Inc.

“Cant wait to implement ideas from this book!”
 —Jeff Cunningham, The Weather Channel Interactive

Common Ajax tasks should be easy, and with Prototype and Scriptaculous they are. Prototype and Scriptaculous are libraries of reusable JavaScript code that simplify Ajax development. Prototype provides helpful methods and objects that extend JavaScript in a safe, consistent way. Its clever Ajax request model simplifies cross-browser development. Scriptaculous, which is based on Prototype, offers handy pre-fabricated widgets for rich UI development.

Prototype and Scriptaculous in Action is a comprehensive, practical guide that walks you feature-by-feature through the two libraries. First, youll use Scriptaculous to make easy but powerful UI improvements. Then youll dig into Prototypes elegant and sparse syntax. See how a few characters of Prototype code can save a dozen lines of JavaScript. By applying these techniques, you can concentrate on the function and flow of your application instead of the coding details. This book is written for web developers with a working knowledge of JavaScript.


Table of Contents

about this book
about the title
about the cover illustration

Part 1 Getting Started

1 Introducing Prototype and Scriptaculous
1.1 A brief history of Ajax
1.2 What is Prototype?
1.3 What is Scriptaculous?
1.4 Applying Prototype and Scriptaculous
1.5 Summary
2 Introducing QuickGallery
2.1 Design and implementation
2.2 Evaluating the classic web app model
2.3 Summary
3 Simplifying Ajax with Prototype
3.1 Redesigning for Ajax
3.2 Using XML and Ajax
3.3 Using JSON and Ajax
3.4 Summary
4 Using Prototypes Advanced Ajax Features
4.1 Prototypes advanced Ajax classes
4.2 Using HTML and Ajax
4.3 Comparing data- and content-centric Ajax
4.4 Summary

Part 2 Scriptaculous Quickly

5 Scriptaculous Effects
5.1 Quick win: adding an effect with only one line
5.2 Setting up Scriptaculous and the examples
5.3Types of Scriptaculous effects
5.4 Understanding the effects
5.5 Easy toggling of Show and Hide effects
5.6 Working with transitions
5.7 Gaining control during effects
5.8 Canceling effects
5.9 Controlling multiple effects
5.10 Summary
6 Scriptaculous Controls
6.1 Using the sample programs for this chapter
6.2 The in-place text editor
6.3 The InPlaceCollectionEditor
6.4 The Ajax autocompleter control
6.5 The Scriptaculous local autocompleter control
6.6 The slider control
6.7 Summary
7 Scriptaculous Drag and Drop
7.1 The sample code for this chapter
7.2 The sample code for this chapter
7.3 Dragging things around
7.4 Dropping dragged things
7.5 Sorting by drag and drop
7.6 Summary

Part 3 Prototype in Depth

8 All About Objects
8.1 Introducing the Scratchpad application
8.2 The Object type
8.3 Objects and Prototype
8.4 Summary
9 Fun with Functions
9.1 JavaScript functions
9.2 Extending functions with Prototype.js
9.3 Summary
10 Arrays Made Easy
10.1 Introducing Arrays
10.2 The native JavaScript Array
10.3 Prototype.js and Arrays
10.4 Methods of the Enumerable object
10.5 Working with Hashes and ObjectRanges
10.6 Summary
11 Back to the Browser
11.1 A crash course in DOM methods
11.2 Prototype and the DOM
11.3 Extending the Event object
11.4 Working with HTML forms
11.5 Summary

Part 4 Advanced Topics

12 Prototype and Scriptaculous in Practice
12.1 QuickGallery application requirements
12.2 Building the slideshow editor
12.3 Adding Ajax-based persistence
12.4 Creating the toolbar
Building the slideshow player 384
12.5 Putting it all together
12.6 Summary
13 Prototype, Scriptaculous, and Rails
13.1 Generating JavaScript
13.2 Ajax helpers
13.3 Scriptaculous helpers
13.4 To JavaScript or not to JavaScript
13.5 The next level: RJS
13.6 Summary
HTTP Primer
Measuring HTTP Traffic
Installing and Running Tomcat 5.5
Installing and Running PHP
Porting Server-Side Techniques