[dojo-contributors] Prototype-al simplicity

Scott J. Miles sjmiles at turbophp.com
Fri Apr 7 14:05:29 EDT 2006


>> One small thing is to declare all the functions like they are part of an
object 

Well, of course they *are* all part of an object. But it's an interesting
question. Generally when Dojo has an object that is designed to be used like
a namespace (i.e. never uses "this") we declare it in long form

  dojo.style....

I suppose we could save some bytes using object notation. Is it worth it?

Of course, we also have 1k worth of "node = dojo.byId(node)". =P

>> style.js: getInnerWidth ... setOuterHeight

I realize Bryan grabbed those up with RegEx, but I want to say for the
record that those names are actually deprecated in favor of using more
standard 'box' nomenclature.

Regards,
Scott J. Miles
TurboAjax Group
http://www.turboajax.com

-----Original Message-----
From: dojo-contributors-bounces at dojotoolkit.org
[mailto:dojo-contributors-bounces at dojotoolkit.org] On Behalf Of Bill Keese
Sent: Friday, April 07, 2006 10:09 AM
To: dojo dev.
Subject: Re: [dojo-contributors] Prototype-al simplicity

>> On 7 Apr 2006, at 04:09, Bill Keese wrote:
>>> How come it's so much bigger?
>> Ok, here's an initial size breakdown: <http://dojotoolkit.org/ 
>> ~psowden/dojolite.html> (DOM (Gecko!), please)

One small thing is to declare all the functions like they are part of an
object (or part of a package?), like this:

dojo.style = {
	getPixelValue: function() { ... },
	getNumericStyle: function() { ... },
};

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.0/304 - Release Date: 4/7/2006
 




More information about the dojo-contributors mailing list