Re: Packages

On Sunday, 4 March 2012 at 18:58, Corey Richardson wrote:

> pages (a la swf, potentially usable for game sites such as Kongregate or
> Newgrounds), or usage in an app store (Mozilla marketplace, Chrome app store).
>  
> Existing solutions:
>  
> Mozilla uses an app manifest, which is a json file sorta similar to
> package.json. Chrome has a similar manifest.json that gets zipped up into a
> package. Chrome distinguishes from a "hosted app" and a "packaged app".
> Packaged are in a .crx, like extensions. These two manifests are different but
> similar.
>  
> AFAICT, besides Chrome's packaged apps, the only local saving is via the
> appcache, if you chose to do it (besides the normal caching). The mozilla docs
> reference something about embedding but it's never stated explicitly.
>  
> My thoughts:
>  
> Combining the manifest.json with Chrome's "Packaged App" would be ideal for
> me. However, it is very chrome-specific in what is exposed to apps. Unlike the
> mozilla ones (from what I can tell), they have full extension capabilities and
> aren't "normal" web apps. What I'd like to see is:
>  
> 1. Standard manifest.json format for package metadata
We already have this (which is virtually the same as the moz format, except in XML):  
http://www.w3.org/TR/widgets/#configuration-document

Seems silly to reinvent the wheel yet again when we already have a spec at REC (note that Opera uses this format for Opera extensions and PhoneGap uses the format for their applications, etc.). The JSON equivalent of the XML packaging format is no more complicated than the XML format:  
http://www.w3.org/community/native-web-apps/2011/10/11/misconception-json-is-easier-than-xml/  

And the XML parsing has a well defined error-handling model, which the JSON equivalent lacks:  
http://www.w3.org/TR/widgets/#algorithm-to-process-a-configuration-document

2. Standard compression and fileformat (gzipped tarball? regular zip? I lean
> away from zip because it seems old and not-very-good-compression).

Perhaps, but it's the de facto standard on all platforms. Requiring other formats makes it painful (e.g.., gzipped on Windows === pain).   
  
Again, W3C Widgets provide a standardised solution:
http://www.w3.org/TR/widgets/#compression-methods
> 3. Way to embed packages
>  
> For #3, I can imagine game sites making an <iframe src="/games/person/foogame.app">
> and there's your game. Boaz mentioned in #bbg that it is more desirable to
> have files separate instead of in a tarball.
>  
> Thoughts?  
Kinda related, widget embedding is currently in the WebApps charter:  

http://www.w3.org/2010/webapps/charter/
http://www.w3.org/2008/webapps/wiki/WidgetEmbedding

There was some interest in it a while ago… might be good to explore it here.  


--  
Marcos Caceres
http://datadriven.com.au

Received on Tuesday, 6 March 2012 11:17:51 UTC