Prototype: Easing AJAX's Pain
$("mydiv"), which is a Prototype function that returns a Document Object Model (DOM) Element associated with the HTML tag with
id "mydiv". That sort of concision alone is probably worth the cost of setting up Prototype. It's the equivalent of:
Another useful Prototype shortcut is
Hash objects (which I discuss below).
Finally, Prototype also wraps the functionality of
XMLHttpRequest with its own
Ajax.Request and related objects, so that you don't have to bother with writing code for instantiating this object for various browsers.
script tag in the HTML code.
The same directory that holds this application's HTML file contains a directory named js. This js directory contains prototype.js, an object definition in the file co2.js, which this article describes, as well as the rest of the application's client-side code in another file: eevapp.js.
How is Prototype going to help with our application's requirements? What are the requirements?