- From: Scott Miles <sjmiles@google.com>
- Date: Thu, 1 Aug 2013 10:16:59 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Dimitri Glazkov <dglazkov@chromium.org>, Marcos Caceres <w3c@marcosc.com>, Kornel Lesiński <kornel@geekhood.net>, public-webapps <public-webapps@w3.org>
- Message-ID: <CAHbmOLaBpCXpoFMN6n-SmjerCbu=7aFKJWiuKPStqgfq2AMr5w@mail.gmail.com>
>> JSON is the way the web does key/value transmission. Fwiw, as we start to employ Custom Elements broadly, this separation between JSON and HTML starts to become troublesome. The knee-jerk implementation for many problems is "acquire this JSON, now translate into HTML". When we morph those into just "acquire HTML" then the whole JSON stage just becomes a millstone. This can be a fraught topic, but I wanted to just toss that in there. =P Scott On Thu, Aug 1, 2013 at 9:57 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Thu, Aug 1, 2013 at 9:24 AM, Dimitri Glazkov <dglazkov@chromium.org> > wrote: > > On Thu, Aug 1, 2013 at 6:17 AM, Marcos Caceres <w3c@marcosc.com> wrote: > >> Hi Kornel, > >> Although I have complete empathy about your criticisms regarding JSON, > it is actually quite fit for this purpose. Using HTML in the way you > describe is kinda problematic, in that it could include scripts and other > resources: basically, one would need to build a DOM to parse out the > information - and even if scripts where not run, or resources loaded, one > would still then need to make a special HTML just for this purpose (which > would confuse people, as if you use HTML you expect to be able to have > access to features of the platform). We are going to need a custom > processor for the JSON format, but at least parsing is already done for us > (as it was with XML, though sadly it seems that devs prefer JSON). > > > > FWIW, I tend to think that Kornel is hitting on something here. > > Whether we want it or not, HTML is the Web's serialization format. > > It's the one that helps us understand where hyperlinks are and how > > resources are interconnected. Having a manifest in that format sounds > > like a Good Thing. > > HTML is the Web's serialization format *for HTML, and other text-like > things*. As Kornel's example shows, HTML is *not* well suited to > holding key/value pairs or the like; you have to hack them in via ugly > <meta> values, and you don't get any of the benefit of the rest of > HTML, because <meta>/<link> *is all you're doing*. > > This is quite different from Templates, because those are actually > leveraging HTML, and so using HTML as the delivery format as well just > reduces impedance mismatch. I don't think that applies here. JSON is > the way the web does key/value transmission. > > ~TJ > >
Received on Thursday, 1 August 2013 17:17:27 UTC