Prototype and Scriptaculous in Action
Dave Crane and Bear Bibeault with Tom Locke
  • April 2007
  • ISBN 9781933988030
  • 54 pages
  • printed in black & white

Shows how Prototype and Scriptaculous let you concentrate on what's important: implementing your ideas.

Thomas Fuchs, Creator of Scriptaculous

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, you'll use Scriptaculous to make easy but powerful UI improvements. Then you'll dig into Prototype's 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.

Table of Contents show full

foreword

preface

acknowledgments

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 Prototype�s Advanced Ajax Features

4.1. Prototype�s 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.3. Types 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

12.5. Building the slideshow player 384

12.6. Putting it all together

12.7. 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
			index

© 2014 Manning Publications Co.

About the Technology

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.

What's inside

  • Explore Prototype's Ajax helper classes
  • How to add Scriptaculous effects and controls
  • Closures in JavaScript
  • Over 100 working examples
  • Covers Prototype 1.5

About the reader

This book is written for web developers with a working knowledge of JavaScript.

About the authors

Dave Crane is an Ajax authority and lead author of the best-selling Ajax in Action. He is currently senior developer for UK-based Historic Futures Ltd., developing the next generation of socially responsible supply-chain systems using Ajax to link rural cooperatives and multinational corporations.

Michael "Bear" Bibeault is a US-based Java programmer with over 20 years' experience in enterprise and Web applications. He's a popular moderator on JavaRanch and coauthor Manning's Ajax in Practice.

Tom Locke is an UK-based independent web developer and trainer specializing in Ruby on Rails. He is the creator of Logix, a multi-language programming system, and the CTO of LiveLogix.


eBook $35.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

Of all the books on my shelf, this is the one I go to the most.

Philip Hallstrom, CardPlayer.com

Simplifies Ajax development - a great reference.

Mark Eagle, MATRIX Resources, Inc.

Can't wait to implement ideas from this book!

Jeff Cunningham, The Weather Channel Interactive