= Prototype ==== An object-oriented JavaScript framework (c) 2005 Sam Stephenson (mailto:sam@conio.net) Prototype is a JavaScript framework that aims to ease development of dynamic web applications. Its development is driven heavily by the Ruby on Rails framework, but it can be used in any environment. === Targeted platforms Prototype currently targets the following platforms: * Microsoft Internet Explorer for Windows, version 6.0 and higher * Mozilla Firefox 1.0/Mozilla 1.7 and higher * Apple Safari 1.2 and higher == Using Prototype To use Prototype in your application, download the latest release from the Prototype web site (http://prototype.conio.net/) and copy dist/prototype.js to a suitable location. Then include it in your HTML like so: === Building Prototype from source prototype.js is a composite file generated from many source files in the src/ directory. To build Prototype, you'll need: * a copy of the Prototype source tree, either from a distribution tarball or from the darcs repository (see below) * Ruby 1.8.2 or higher (http://www.ruby-lang.org/) * Rake -- Ruby Make (http://rake.rubyforge.org/) * RDoc, if your Ruby distribution does not include it * darcs 1.0.1 or higher (http://abridgegame.org/darcs/; static binaries available at http://www.scannedinavian.org/DarcsWiki/CategoryBinaries) From the root Prototype directory, * rake dist will preprocess the Prototype source using ERB and generate the composite dist/prototype.js. * rake package will create a distribution tarball in the pkg/ directory. == Contributing to Prototype You'll need the tools mentioned above. Modify the files in src/, add tests in test/ if possible, generate a new dist file, and record the changes with darcs record -al. Then email patches to mailto:sam@conio.net using darcs send. == Documentation Prototype is embarrassingly lacking in documentation. (The source code should be fairly easy to comprehend; I'm committed to using a clean style with meaningful identifiers. But I know that only goes so far.) Much of the problem is that there is no easy way to document it from within the source code itself. I've tried JSDoc[http://jsdoc.sf.net/] and a Perl script included with JsUnit[http://www.edwardh.com/jsunit/]; neither groks Prototype's hash-style class definitions or inheritance scheme. Making them work would require major changes, and I don't have the time for that right now.