Prototype grows on me

Usually, these days I add a comment to a Delicious link, building on the mountain of metadata of the commons, but this calls for more verbose plappering: Prototype Meets Ruby: A Look at Enumerable, Array and Hash from the [Encytemedia blog](http://encytemedia.com/blog/), written by Justin Palmer.

The [Prototype](http://prototype.conio.net/) Javascript framework implements a lot of the “language features” people scream about: `each`, `collect`, hashes, `inject`, `include`, `findAll`, `detect`, and `invoke`. Mr. Palmer has dug up Prototype author Sam Stephenson’s test cases, and learnt a lot from them. He links to [the test cases](http://dev.conio.net/repos/prototype/test/), and urges you to read them, if improved Javascript using Prototype interests you. Palmer’s explanations are worth their weight in gold, though.

Looking at the code, I predict that future Javascripts will become so much shorter.

Thanks, Justin P.

*PS:* [The unittest.js](http://dev.conio.net/repos/prototype/test/lib/unittest.js) is also linked from the enumberable test case. Readable code.

Published by Olle Jonsson

Human. Wears glasses and often a smile.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.