List Info

Thread: OK. I'm confused again.




OK. I'm confused again.
user name
2006-08-15 18:40:03
> 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 <sam.googleiness.com> 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-spinoffslists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-
spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffslists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-
spinoffs
OK. I'm confused again.
user name
2006-08-15 19:04:43
I couldn't agree more.

And as Thomas himself has expressed here... optimization is the very last thing you need to worry about.

On 8/15/06, Brandon Aaron <gmail.com">brandon.aarongmail.com> wrote:
> 1 - Is every object that is extended by Enumerable going to have iterable
&gt; 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? &nbsp;Prototype is adding
>; *lots* of extra stuff to everything it touches.&nbsp; 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 <iness.com">sam.googleiness.com> wrote:
&gt; > 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".&nbsp; Thanks. &nbsp;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.&nbsp; I hope to dig up the answers myself.
&gt;
> 1 - Is every object that is extended by Enumerable going to have iterable
&gt; class names?
>;
> 2 - Just how much "baggage" is too much in JavaScript? &nbsp;Prototype is adding
&gt; *lots* of extra stuff to everything it touches.&nbsp; 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?
&gt;
>
>;
>
> _______________________________________________
> Rails-spinoffs mailing list
> lists.rubyonrails.org">Rails-spinoffslists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>;
_______________________________________________
Rails-spinoffs mailing list
lists.rubyonrails.org">Rails-spinoffslists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )