table of contents

Prototype Tutorial

An Introduction to the
Prototype JavaScript Framework

This Prototype tutorial is derived from Marty Hall's world-renowned live Ajax and GWT training courses. The topics in this tutorial also appear in Marty's more general Ajax and GWT tutorials.

Available free for university faculty: The original PowerPoint versions of the tutorials are available free for university faculty in certain cases. Please see instructor usage rules for details.


The Prototype JavaScript Framework
Part I: Ajax Support

Tutorial section:

Topics:

  • Overview of Prototype
  • Installation
  • Ajax.Request
    • Basics
    • Options
  • HTML lookup and insertion
  • Ajax.Updater
  • Ajax.PeriodicalUpdater
  • Handling JSON Data

Source code


The Prototype JavaScript Framework
Part II: General JavaScript Support

Tutorial section:

Topics:

  • Element
    • Helper methods for exploring DOM
    • Helper methods for updating DOM
  • Array
    • Helper methods that take simple arguments
  • Enumerable
    • Helper methods that take functions as arguments
  • Function
    • Helper functions that operate on other functions
    • Usually to build new functions that are based on old functions
  • Number
    • Methods called on numbers

Source code


The Prototype JavaScript Framework
Part III: OOP Support

Tutorial section:

Topics:

  • Constructor and prototype in one place
  • Single inheritance (sort of)
  • Merging objects
  • Multiple inheritance (sort of)

Source code