Why we use Prototype.js
In Gaia Ajax we use the library
Prototype.js by Sam Stephenson because it first of all is starting to become much of a standard when it comes to utilizing Ajax and second of all is the best fundament for an Ajax library around at the time being. Since we're using prototype.js we effectively manage to reduce the amount of JavaScript in our internals to a fraction of what we otherwise would have made since prototype abstracts away things like inheritance, polymorphism, iterating enumerables etc.
This makes it possible for us to mirror the System.Web.UI.WebControl class hierarchy on the client side and thereby reducing the bandwidth to a fraction of what we otherwise would have consumed. Our JavaScript "Button" class is for instance less than 100 lines of code. And when we render updates for our Button object after the initial rendering we call methods like "setVisible" and "setText" etc instead of rerendering the complete HTML. In addition to that this reduces bandwidth ALOT it also makes it possible for us to maintain STATE on the client side which is imperative when building more advanced controls like AutoCompleter and DateTimePicker.
Other prototype related resources
We're also using skins and images from the Prototype Window project;
Prototype WindowWe'd like to say thank you to Sébastien Gruhier for creating this fabulous project that we've learned a lot from. We tried to use the library "as it was" in early versions of Gaia in fact, though unfortunately it didn't match our code model.