Re: HTML as application manifest format

You could in fact even embed JSON in HTML, like JSON-LD suggests:

http://json-ld.org/spec/latest/json-ld/#embedding-json-ld-in-html-documents


On 4 August 2013 22:23, Melvin Carvalho <melvincarvalho@gmail.com> wrote:
>
>
>
> On 1 August 2013 18:57, 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.
>
>
> It's rather easy these days to embed key value pairs in HTML.  10s if not
> 100s of millions of sites do it using rdfa, schema.org, open graph protocol
> etc.
>
> The markup need not be ugly
>
> Often it's as simple of adding a "rel" attribute in a tag (the key), and
> then the value is put inside the tag.
>
>
>>
>>
>> ~TJ
>>
>



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718

Received on Tuesday, 6 August 2013 14:52:11 UTC