This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22836 - Missing First Principle in overall Design
Summary: Missing First Principle in overall Design
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14949
  Show dependency treegraph
 
Reported: 2013-07-30 06:51 UTC by Shark
Modified: 2015-07-06 08:14 UTC (History)
2 users (show)

See Also:


Attachments

Description Shark 2013-07-30 06:51:19 UTC
Every tech concept/architecture should derived from single First Principle, so that the concept/architecture is compact, consistent and easy to understand in future evolution. 
Per my understanding, component model(web components) tries to model the UI to get UI better structured and reused. And we need a First Principle to guide this. 
I think the most suitable First Principle here can be Object Oriented. 
E.g. Custom Elements try to make html elements object oriented (support element encapsulation and extend)
Shadow DOM try to make dom tree object oriented(support dom tree encapsulation and extend)
So base on above statement, I think we should have a better name for Shadow DOM, since this name can not reflect its core value & feature. 
Also the same for the method to start shadow dom (ele.createShadowRoot).
Comment 1 Dominic Cooney 2013-07-30 11:56:14 UTC
(In reply to comment #0)
> Every tech concept/architecture should derived from single First Principle,
> so that the concept/architecture is compact, consistent and easy to
> understand in future evolution.

This is an interesting idea. I'm not sure that I agree it has to be just one, but let me think about it.
 
> Per my understanding, component model(web components) tries to model the UI
> to get UI better structured and reused. And we need a First Principle to
> guide this.

The experience from early adopters is that Web Components is useful UI and for much more. UI is something relatively concrete that many web developers have experience with so it is a good place to start explaining Web Components. Maybe we should make another try at explaining the more general idea.

> I think the most suitable First Principle here can be Object Oriented. 
> E.g. Custom Elements try to make html elements object oriented (support
> element encapsulation and extend)

I think object orientation is a bad metaphor; the composition of Custom Elements is pretty different to objects. Although the ideas about encapsulation and reuse are pretty close to the mark.

> Shadow DOM try to make dom tree object oriented(support dom tree
> encapsulation and extend)
> So base on above statement, I think we should have a better name for Shadow
> DOM, since this name can not reflect its core value & feature. 

Do you have a suggestion for what this name would be?

> Also the same for the method to start shadow dom (ele.createShadowRoot).
Comment 2 Shark 2013-07-30 15:05:40 UTC
(In reply to comment #1)
Hi Dominic, 

First of all thanks for your reply. 
Since I am not from English language country, please pardon my poor English. 

> (In reply to comment #0)
> > Every tech concept/architecture should derived from single First Principle,
> > so that the concept/architecture is compact, consistent and easy to
> > understand in future evolution.
> 
> This is an interesting idea. I'm not sure that I agree it has to be just
> one, but let me think about it.

To supplement this point: Due to the furture uncertainty, the evolution is uncontrolable. It's not possible to guarantee that there is no clash between concepts derived from different FP.


> > Per my understanding, component model(web components) tries to model the UI
> > to get UI better structured and reused. And we need a First Principle to
> > guide this.
> 
> The experience from early adopters is that Web Components is useful UI and
> for much more. UI is something relatively concrete that many web developers
> have experience with so it is a good place to start explaining Web
> Components. Maybe we should make another try at explaining the more general
> idea.
> 

Agree, at least newbies like me prefer to know the undergroud idea for the innovation.  

> > I think the most suitable First Principle here can be Object Oriented. 
> > E.g. Custom Elements try to make html elements object oriented (support
> > element encapsulation and extend)
> 
> I think object orientation is a bad metaphor; the composition of Custom
> Elements is pretty different to objects. Although the ideas about
> encapsulation and reuse are pretty close to the mark.
> 

Object is a conceptual glossary, also object orientation, it should not bind to some specific tech. During design process, if with the idea in mind, you can say it's object oriented. To extend this, we can use object oriented in design/architecture in industries other than software. 
Practice proved that Object oriented is a good design approach comforming to nature. I insist that it should suitable here. 


> > Shadow DOM try to make dom tree object oriented(support dom tree
> > encapsulation and extend)
> > So base on above statement, I think we should have a better name for Shadow
> > DOM, since this name can not reflect its core value & feature. 
> 
> Do you have a suggestion for what this name would be?
> 

We can say younger Shadow DOM extend older Shadow DOM/original DOM, and this younger Shadow DOM can customiz/reuse the parent DOM's structure(hide/expose parent DOM's contents), now this is doable via <content> & <shadow>. And of course itself can be extend. 
Here I only can explain my understanding here, I can not find a English word to precisely express it. Sorry again for my poor English. 


> > Also the same for the method to start shadow dom (ele.createShadowRoot).

The current api to start the shadow dom can be replace by something like: extend()?
Comment 3 Dominic Cooney 2014-01-20 02:48:34 UTC
How is "define widgets with a level of visual richness and interactivity not possible with CSS alone, and ease of composition and reuse not possible with script libraries today" as an overarching principle?
Comment 4 Hayato Ito 2015-07-06 08:14:05 UTC
Moved to https://github.com/w3c/webcomponents/issues/231