Java Reference
In-Depth Information
Installing the Frameworks
First, you need to acquire the framework's JavaScript fi le. Most frameworks come in at least two versions:
compressed and uncompressed.
Compressed versions: These are
minifi ed (all comments and unnecessary white space are
removed) in order to make their fi le size as small as possible; doing so makes them faster to
download when someone visits your web page. Unfortunately, the minifi cation process makes
the JavaScript code diffi cult to read if you open it in a text editor, but that's a reasonable tradeoff
in a production environment.
Uncompressed versions: These are not minifi ed; they are simply normal JavaScript code fi les
with their white space and comments intact. It's perfectly OK to use uncompressed JavaScript
fi les. Since they are easier to read than compressed fi les, you can learn much from the gurus
who design and develop these frameworks. However, if you plan to roll out a web page using a
framework, be sure to download and use the compressed version, as their fi le sizes are smaller
and download faster.
Downloading the Frameworks
Unlike other downloads on the web, jQuery, Prototype, and MooTools do not use a compression algo-
rithm (like ZIP or RAR) for their downloadable fi les; instead you download the JavaScript fi le itself.
These fi les have an extension of .js .
First you need to acquire a copy of jQuery as follows:
1.
Open your browser and go to http://jquery.com .
2.
Find the Download button on the site's front page.
3.
Before clicking the Download button, choose the version you want — either the production
version (compressed) or the development version (uncompressed). jQuery will work the same
regardless of what version you choose. At the time of this writing, jQuery project downloads
are actually housed at Google code, so clicking the Download link will take you away from
jquery.com .
4.
Download the JavaScript fi le and save it in a location you can easily get to.
You can also see a list of all downloadable fi les at http://code.google.com/p/jqueryjs/
downloads/list .
The production version of jQuery 1.3.2 is provided in the code download from Wrox.
5.
Now point your browser to Prototype's download page at http://www.prototypejs.org/
download . Here, you'll be given the choice to download a bleeding edge version, a version still
in testing, or the latest stable version. You can download the in-testing version if you'd like, but
the examples in this topic will use the stable version.
The stable version of Prototype 1.6.0.3 is provided in the code download from Wrox.
Search WWH ::




Custom Search