nod
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Werner Punz
Sent: Tuesday, January 03, 2006 5:04 PM
To: [email protected]
Subject: [Rails-spinoffs] Re: Status of Prototype
Well exactly, and in case of earlier prototype versions
the array was broken that way, now if
another library used for(var p in anarray) the for
iterated wrongly.
Hence the code breakage of the struts validation
(I was not aware of this myself until someone
pointed me towards it a few weeks ago)
As I said all these problems are solvable and probably
not really huge issues if you are in your own application space
but we talk here about base component libraries, used
by probably thousands of people worldwide in the future.
I am not sure anymore if it is a good idea of introducing
a library which messes around with such fundamental things.
(As I posted before, Object is not an exception but more the rule,
because prototype messes around with various other base objects
as well)
As I said before to me the namespace problem is less problematic
(although having namespaces preallocated for ${} Form etc...
is not too nice either)
but the basic object altering probably is more critical if you
try to use prototype in a somewhat unknown environment (where you
cannot be sure which lib comes along)
Ryan Gahl wrote:
> For just a simple example of what I think Werner was talking about,
> consider the following snippet (o is any Object). By messing around
with
> the prototype of the built-in "Object" object, the number of and types
> of variables "p" in the below snippet have been changed. In some cases
> this will cause problems, especially in libraries that do that sort of
> iteration. For that reason, prototype hacking is generally frowned
upon,
> however.. these types of issues can be identified and fixed fairly
> easily, and again IMHO (for my project), the benefits of the
> prototype.js library outweigh these negatives. Having said that, it's
> not perfect and I will eventually evaluate Dojo in light of all the
> recent posts about it.
>
> for (var p in o)
> {
> alert(o[p]);
> }
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> danilocelic
> Sent: Tuesday, January 03, 2006 4:39 PM
> To: [email protected]
> Subject: Re: [Rails-spinoffs] Re: Status of Prototype
>
> Werner Punz wrote:
>
>
>>The most famous example being the struts client side validation which
>>basically was disabled by this, to my knowledge.
>>I know this problem has been fixed. But one of the main critique
>
> points
>
>>by the main critique was, that there are still many of those
>
> extensions
>
>>which could cause potential breakage.
>
>
> For my own education, could you point to a resource that lists, or
> discusses what these potential breakages could be and what would cause
> them within a library/framework such as prototype?
>
> Danilo
>
> _______________________________________________
> Rails-spinoffs mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
> The information transmitted in this electronic mail is intended only
for the
> person or entity to which it is addressed and may contain
confidential,
> proprietary, and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance
upon,
> this information by persons or entities other than the intended
recipient
> is prohibited. If you received this in error, please contact the
sender and
> delete the material from all computers.
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs