1 - Is every object that is extended by Enumerable going to have iterable class names?
Yes but it will probably be necessary to overwrite the _each method so that the Enumerable knows how to iterate through your collection. At least this is my understanding.
2 - Just how much "baggage" is too much in JavaScript? Prototype is adding *lots* of extra stuff to everything it touches. When does it become a problem? Will memory consumption become an issue, will CPU consumption go through the roof scanning hundreds of methods and properties on every object?
There is a delicate balance between application performance and developer performance. I tend to lean a little more towards developer performance and then address any application perfromances as they become apparent. With that said, I've been using prototype on several rather large projects in the last few months and I have yet to see a performance hit worth mentioning. I think in regards 'to adding *lots* of extra stuff' to your application, you will see the same thing from other libraries. However, the namespace that they put the 'extra stuff' is different. Typically you are left with typing out verbose namespaces and dealing with less expresive code. Brandon On 8/15/06, Sam <[EMAIL PROTECTED]> wrote:
> It creates a new class/object representing the class names. The class > is called Element.ClassNames and it is extended by Enumerable. That > means you can iterate through the element's class names. Pretty cool. "Extended by Enumerable". Thanks. Now I know where to look. A good answer usually raises other good questions. It seems reasonable to post those questions back here, though I am doing so only to share my thoughts. I hope to dig up the answers myself. 1 - Is every object that is extended by Enumerable going to have iterable class names? 2 - Just how much "baggage" is too much in JavaScript? Prototype is adding *lots* of extra stuff to everything it touches. When does it become a problem? Will memory consumption become an issue, will CPU consumption go through the roof scanning hundreds of methods and properties on every object? _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs