W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2013

Re: HTML as application manifest format

From: Scott Wilson <scott.bradley.wilson@gmail.com>
Date: Sun, 4 Aug 2013 17:20:30 +0100
Cc: <public-webapps@w3.org>, Marcos Caceres <w3c@marcosc.com>
Message-Id: <052BF409-FB95-4D61-9F25-FB5E065CF9E6@gmail.com>
To: Kornel Lesiński <kornel@geekhood.net>

On 1 Aug 2013, at 18:29, Kornel Lesiński wrote:

> On 1 August 2013 12:44:19 Scott Wilson <scott.bradley.wilson@gmail.com> wrote:
>> Or you could perhaps use XML. A bit like, er, this:
>> 
>> http://www.w3.org/TR/widgets/
> 
> Hehe ;)
> 
> I'm trying to address two things:
> 
> 1. it's been shown ever and over again that developers on the wild web are really bad at working with strict syntax. HTML, XHTML that won't parse with right mime type, even RSS ended up as a soup.
> 
> Strict manifest will inevitably face the same tension - either single misplaced  JSON comma or XML quote will break the app (and frustrate developers) or browsers and other clients will eventually give up again and accept almost-JSON soup that "works".
> 
> HTML already got past that and deals with real-world mess. Let's not tempt JSON5 :)


I'm quite happy with JSON, XML and HTML.... we've never had any real issues with badly-formed Widget manifests. I don't think there have been many broken OpenSocial apps due to markup issues either for that matter. So XML seems OK with most web developers treating metadata documents like any other structured document. 

JSON on the other hand is a pain to write and fix by hand, even with JsonLint. 

However, the argument has been strongly put in favour of JSON by our friends at Mozilla, whereas I'm firmly +0 on this one.

> 
> 2. Pave the cow paths. We already define web apps using meta tags, including bunch of Apple's tags for web apps ("added to home screen" kind).
> 
> Meta is a well-understood existing mechanism that works. Everybody building web apps creates and references HTML pages with metatags all the time.
> 
> Another very important aspect of it is that it lowers the learning curve a lot.
> 
> You learn how to add one meta (that's the charset, should be mandatory for every dev). You then learn few more metas for favicons, google, viewport, mobile Safari. You copy&paste them. *Then* you learn how to create common file, and you do it based on whatever you have working already.
> 
> Very easy and gradual.

I think going with meta tags is a very nice, easy way to get started and builds on existing habits. 

Another approach is that taken by http://schema.org/ and microdata. In general, pretty much everything in the metadata also turns up somewhere in the app html so between meta and microdata you've probably got most of the metadata covered.

However, sometimes you just want the metadata without accessing the app itself. In which case, having a separate format matters. So you're back to square one again!

> 
> OTOH new format, with new names, new structure, no comments in JSON case, new and annoyingly pedantic syntax and separate file from day 1 is jumping on the deep end.

Well, we've had quite a long time to get used to it! Apple Dashboard, Konfabulator, Windows Vista Sidebar, OpenSocial, Opera Widget, Apache Wookie... and we're still seeing implementations of the existing Widget XML spec in all kinds of odd places (vehicle dash, TVs, electronic whiteboards in schools...)

The barriers have largely been the major platforms having an attack of NIH, not any inherent technical problems with HTML vs JSON vs XML :)
> 
> It's trivial for us, experienced developers in this forum, to write JSON manifest, but beginners on the web start with  copy&paste and very little knowledge (and that's good! That's a low barrier to entry) so reusing their skills and letting them learn in small increments will help them a lot.
> 
> Also look into the future - if Web Components with <link rel=import> take off you'll have lots of pages importing HTML of jQuery of components.
> HTML import might become natural and logical way of extending pages, and JSON may remain the odd exception.
> 
> -- 
> regards, Kornel

> 
> 


Received on Sunday, 4 August 2013 16:21:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:12 UTC