W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2015

Re: [whatwg] HTML6 proposal for single-page apps without Javascript

From: Sandro Paganotti <sandro.paganotti@gmail.com>
Date: Mon, 23 Mar 2015 14:15:31 +0000
Message-ID: <CAJ8dBB6SquDUWRnuS3aEU+yxSqo=b3emJesmgPYRM4fsTi4fuA@mail.gmail.com>
To: Bobby Mozumder <mozumder@futureclaw.com>
Cc: whatwg@whatwg.org, public-html@w3.org
On Mon, Mar 23, 2015 at 2:05 PM, Bobby Mozumder <mozumder@futureclaw.com>
wrote:

>
> On Mar 23, 2015, at 8:46 AM, Sandro Paganotti <sandro.paganotti@gmail.com>
> wrote:
>
> To me it sounds a quite elegant solution to use web components to extend
> the existing elements, for example by using the is attribute, to allow them
> to actually fetch a specific resource from web as you suggested. Using this
> technique would also allow other developers to extend the new behaviour in
> order to embrace various specific use cases.
>
> -sandro
>
>
> I don't see that as a clean solution at all.  Web developers still have to
> learn the inherited model class
>
> So, instead of:
>
> <ARTICLE model="myArticleData">
>
> You're asking web developers to do something like:
>
> var proto = Object.create(HTMLArticleElement.prototype, {   // some type
> of initial element definition
>          model: {
>              get: function() { ...  },
>              set: function() { ...  },
>          });
> proto.createdCallback = function(model) { // now we have to attach an
> event listener to the model
> model.addEventListener('change', function(e) {
> e.target.model.set( model )
> });
> }
> var xArticle = document.registerElement('x-article', {     // now register
> the element
>   prototype: proto,
> extends: 'article'
> });
>
> <ARTICLE is="X-ARTICLE" model="myArticleData">   // and then use a
> different name
>
> (And this is the simplified version...)
>


well, yes; but once it's done accordingly to the behaviour required it
could be released and then used by everybody. So it is just a matter of
creating a new catalog of components that anyone can import using the html
import. In my view it would be something really close to your initial
implementation proposal:

<article is='json-enhanced' remote-node="
http://apiname/endpoint.json:propertyname"></article>

-sandro.





>
> -bobby
> ---
> Bobby Mozumder
> *Editor-in-Chief*
> FutureClaw Magazine
> mozumder@futureclaw.com
> +1-240-745-5287
> www.futureclaw.com
> twitter.com/futureclaw <https://www.twitter.com/futureclaw>
> www.linkedin.com/in/mozumder
>
>
Received on Monday, 23 March 2015 14:16:17 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:29 UTC