[whatwg] Component Model Progress

Joel Laird jubbynox at gmail.com
Fri Aug 12 03:31:32 PDT 2011


Hi,

I have been following the w3c discussion at
http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/1345.html and
have read the use cases at
http://wiki.whatwg.org/wiki/Component_Model_Use_Cases.
I think such as feature is very useful as web applications become more
prevalent and especially with the interest in web operating systems. The
available JavaScript GUI frameworks are great, but we need some
standardisation and simplification to promote growth in this area.

I would like to get involved and was wondering what the current status is of
this feature?

For my part, as a hobbyist web developer, I have suggestions as to how I'd
like to use this feature and have written a framework (
http://code.google.com/p/htmlcomponentframework/) and an article (
http://www.codeproject.com/KB/HTML/htmlcomponentframework.aspx<http://www.codeproject.com/KB/HTML/htmlcomponentframework.aspx#>)
of how the functionality could be exposed.
With time I would like to improve this and have something similar integrated
within the browser; for now it depends on div and iframe elements whereas
ideally I'd like to be able to define new elements and use them within the
HTML body. The usage, though, is essentially the same:

Within the parent (hosting) page:

   - Add elements to the HTML head to define the components that are to be
   used.
   - Add elements to the HTML body (either by markup or DOM manipulation)
   where the components are to be shown.
   - Integrate code with the components by: registering event handlers with
   them, firing events at them, and altering their exposed DOM.

To create a component:

   - Write a normal HTML+CSS+JavaScript web page to implement the desired
   functionality.
   - Add elements to the HTML head to define: the component's exposed DOM,
   the events it can receive, the events it can raise.


The implications of something like this reach further than just simplifying
the modularisation of web applications. For example, it would be possible
to:

   1. Define an address book component's contract.
   2. Expose a component fulfilling the contract from online address book
   applications.
   3. Consume my preferred address book application provider from within an
   online email client or social network site by pointing them at the
   component's URL and using oAuth to authorise access.
   4. From within the consuming web application select and edit my contacts
   using my actual address book application provider that I am familiar with.


Regards,
Joel


More information about the whatwg mailing list