Re: Overview of behavior attachment as a general problem on the Web

On 7/8/2011 1:18 PM, Dimitri Glazkov wrote:
> As a background for the wider Component Model discussion, I put
> together an overview of the general behavior attachment problem on the
> Web:
>
> http://wiki.whatwg.org/wiki/Behavior_Attachment
>
> Please take a look. Comments, additions, and critique are appreciated.
>
> :DG<
First, I like the overview, I think it helps clear up a lot of issues. 
And it raises lots of questions, which is also good ;-).

I'm not quite connecting the dots. Behavior attachment is needed, your 
examples demonstrate that. You claim the missing facility is atomic 
component addition and proper encapsulation. Perhaps this is well known, 
but I think it would be helpful to explicitly explain why organized 
behavior attachment requires encapsulation. Actually I think a better 
approach is to explain why/how behavior attachment with encapsulation 
will be better, cheap, faster.  A small example would be helpful 
(perhaps later in the document).

Your introduction highlights encapsulation. However, it seems to me that 
encapsulation is secondary to componentization: the critical step is to 
have a way to group HTML/CSS/JS in to a unit that can be developed 
independently and then be used without reference to the implementation.  
Encapsulation in the the OO sense adds constraints that enforce the 
boundaries.  It's great and maybe even critical but not primary.

The examples sections are great, perhaps some experts will correct some 
details but your overall approach here is excellent.

The Behavior Attachment Methods section is also super, but at the end I 
was puzzled. I thought the Shadow DOM proposal only allowed one binding, 
and thus it would exclude exactly the Decorator pattern we need to 
compose multiple frameworks.  I understand how you can solve the Dojo or 
Sencha or jQuery problem better, but I don't see how you can solve the 
'and' version.

HTH,
jjb

Received on Saturday, 9 July 2011 04:42:51 UTC