cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Concerns about the Prototype JS library
Date Thu, 13 Oct 2005 15:37:12 GMT
Hi all,

I just found a very annoying "feature" of the Prototype library on which 
the nice Scriptaculous Ajax stuff is buit. It adds a number of methods 
to the Array class to bring more features such as filtering, mapping, 
iterating, etc.

Sounds nice at first, but this has the effect of breaking JS code that 
iterates on arrays using "for (var i in array_var)", since all 
additional methods are now added to the iteration list with the array 

This broke htmlarea which I fixed by replacing the above syntax with the 
more java-ish "for (var i = 0; i < array_var.length; i++).

I consider this modification of the well known-contract of a native JS 
type a very bad thing, and this makes me consider to possibly use 
something else than Scriptaculous. I also raised this issue on their 
mailing list ([1] and follow-ups).

A good other candidate is Dojo [2] (no relation with Berin's container) 
which is growing fast, is the work of a team rather than a man, and has 
a cleaner and more documented code.

Other possible candidates you are aware of ?



Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

View raw message