[Bug 21258] New: [Explainer]: this spec seems extremely dev-oriented, rather than HTML-writing-people oriented

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21258

            Bug ID: 21258
           Summary: [Explainer]: this spec seems extremely dev-oriented,
                    rather than HTML-writing-people oriented
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: pomax@nihongoresources.com
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 14949

I have no idea how much influence a bug has in this process, but I read the web
components draft and it strikes me as a throwback to XML verbosity for the sake
of backward compatibility, which doesn't make the most sense. I'd like to point
out things that seem overly complicated, and then I supposed what happens with
that feedback is up to the editors.

As a normal person, I don't like writing out things that an engine should be
able to automatically do for me, so the current element create and use feels
like something that was never tested against user expecation: I expect to be
able to do the following, for instance, rather than what the draft proposes:

Define an element in roughly the same way: <element extends="button"
name="x-mybutton">...</element>

and then in my document, because I defined an x-mybutton element, I can now use
*that* element. So I can do <x-button>...</x-button>. One reason is that it's
clean - there is nothing that technically prevents this from how it should
work; for backward compatibility we can use JS shims, and they'll work
brilliantly. Another reason is that this is HTML code that others can use, too.
Just include my template and off you go, you don't need to know what
"x-mybutton" extends to use it, because that shouldn't matter. All that matters
is that I tell you that if you're using my x-mybutton, it'll do how I described
it.


Similarly, I shouldn't have to indicate what the JS constructor is called. If I
define an element with name "x-mybutton", then the JS engine can pick up on
that, and I should be able to do this:

  var newMB = new xMybutton();

I should not be responsible for defining JavaScript engine behaviour in HTML.
Again, this is something that engines can easily automatically do. Just say "to
support web components, the JS engine should offer a constructor for an element
based on its camelcase name" and done, that's now the spec, and it'll be
brilliant.

I love the idea of web components, but the way it's drafted right now looks,
genuinely, terrible for the general population. This draft is way more
complicated than it needs to be, making the user responsible for a lot of
things the HTML and JS engines can easily take care of perfectly.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 12 March 2013 18:01:27 UTC