[dojo-contributors] Re: Figuring out what Dojo needs to become. A few questions.
Alex Russell
alex at dojotoolkit.org
Fri Dec 22 11:54:27 EST 2006
On Friday 22 December 2006 8:13 am, Eugene Lazutkin wrote:
> I agree basically with everything in your laundry list but I am
> curious to hear some explanations/rationale behind items. Inline.
>
> Alex Russell wrote:
> > * simplify the widget construction syntax
> > - remove the <dojo:whatever ...> style in HTML environments
>
> Why?
It's confusing and not generally useful.
> > - remove the <div dojoType="..."> style in HTML environments
>
> Why?
It's a major marketing "ding" against us. As much as I hate to say it,
we lose a lot of respect because of our pragmatism and it's backed us
into a pretty low-performance decisions. If we side-step them entirely
(behavior hacks + XSLT), we can get better performance and put to death
some of the nay-saying, all with one stone. Seems like a no-brainer.
> > - enhance the <div class="dojo-Whatever"> style to support
> > parameter passing based on node ID and/or type
>
> How do you plan to enhance it?
With a syntax similar to what we've prototyped in the dojo.behavior
module. Here's a straw-man API for registering a set of default
properties of a widget type on a given page, based on the behavior API:
// not sure if this should live under dojo.widget.*
dojo.widget.add({
"dojo:ComboBox": {
width: "30px",
complexProperty: {
thinger: "value",
blah: "value2"
}
},
// individual widget configuration based on node ID
"#id4": {
dojoType: "dojo:ComboBox",
// widget properties here
...
},
...
});
Of course, we still need inline configuration. Here's how:
<div class="dojo-ComboBox"
style="border:1px solid black; dojo-PropertyName: value;
dojo-PropertyName2: value2; ...">
...
</div>
In this case, we would obey a cascade much the way CSS behaves today and
if users specify all of their properties in the parser-advice block, we
can avoid string casting and significant amounts of iteration.
Obviously, this syntax is HTML-specific, but as we've been finding out,
being "agnostic" about rendering environment has real costs and parts
of the world we planed for once-upon-a-time never materialized. Other
parts did. Time to do minor course corrections to meet reality where it
is.
Regards
--
Alex Russell
alex at sitepen.com A99F 8785 F491 D5FD 04D7 ACD9 4158 FFDF 2894 6876
alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20061222/16283176/attachment.sig
More information about the dojo-contributors
mailing list