Giter Site home page Giter Site logo

manifest's Introduction

manifest's People

Contributors

aarongustafson avatar afbarstow avatar alancutter avatar alrra avatar anssiko avatar christianliebel avatar darobin avatar domenic avatar dontcallmedom avatar github-actions[bot] avatar hexalys avatar janiceshiu avatar jmajnert avatar jugglinmike avatar jyasskin avatar kenchris avatar marcoscaceres avatar marcoscaceres-remote avatar mcgreevy avatar mgiuca avatar mounirlamouri avatar notwoods avatar philloooo avatar plehegar avatar robdolinms avatar saschanaz avatar sidvishnoi avatar siusin avatar tomayac avatar xfq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

manifest's Issues

camelCase more suitable to JSON and JS API

I feel acting as a devil advocate coming back to that topic, but as I think the newly introduced naming convention, which is finally not the one we ended too before, introduce a new issue.

It is related to these issues:

  • #7 (Inconsistant naming of members)
  • #50 (The manifest as a compliant JSON Package)

In the first issue we said we needed a naming convention. Discussion was about choosing between "_" which was used in google and firefox manifest files, and camelCase which is more standard in JS and JSON formats including "package.json" mentioned in the second issue (but also JSON Schema Validation, GData JSON representation, ...)

"" looked to have been chosen for remote compatibility, but it looks like the "-" separator is known the one applied. So the remote compatibility argument is not valid anymore. I agree also that there is probably as much REST / JSON APIs out there using "" than the ones using camelCase. It is often because the JSON format is a port of an XML version in which "_" is more standard or because the server language use this convention (ex: perl)

Current version of the specification use "-"...
"-" is used in CSS but is problematic in JSON once converted into JS object as it is not a valid character for JavaScript identifiers (while "_" was at least ok)

This is why CSS properties in JavaScript are turned into camelCase notation, and so do the vendor prefix notations:

  • "background-color" vs "backgroundColor"
  • "-webkit-app-region" (vendor CSS rule) vs webkitSpeechRecognition (Chrome API)

Potential impacts are that:

  • such keys would require bracket notations if mapped as is in JS
  • keys requiring bracket notation are usually not proposed for autocompletion
  • user may expect a JS API to use a camelCase version or at least not expect having such named keys

Potentially concerned "properties" in the current edition of the specification are:

  • "altname": no separator used, but I would have expected "altName" for consistency
  • "dont-share-cookies-and-stuff": strangely long key, would need to be renamed "dontShareCookiesAndStuff", but may probably better have a shorter name
  • vendor extensions as "webkit-fancyfeature" should better be "webkitFancyFeature"

Migrate to webapps

Migrate the various administrative links to webapps.

Included the ipr page, the mailing list, etc.

Do apps need a short name?

Many apps have a long name e.g., "The Weather Channel App" but when displayed in a context with little space (e.g., on an idle screen) the name won't fit. As such, many native apps provide an alternate short name.

For example, the "Github issues" application shows up as "Issues" on the iPhone. Same with "Robot Unicorn Attack 2", which shows up as "RUA2". When searching for an app (on the phone), both the long name and the short name can be used as indexes.

Do we want so support additional viewmodes?

The current manifest supports "fullscreen": true | false.

If people are really serious about supporting other view modes, then we can change the manifest to allow the various view mode values. Something like:

{

"viewModes": ["fullscreen", "maximized"]
...
}

Where viewMode is: A list that denotes the author's preferred view mode, followed by the next most preferred view mode and so forth. When the value is missing, or is left empty, it implies that the author expects the user agent to select an appropriate viewmode for the application.

With regards to width and height, we will need those for the "floating" case. But they only serve as a hint for the preferred width and height when the app starts up. I don't think we should add other window positioning information (leave that to the window manager).

[1] http://www.w3.org/TR/view-mode/

Title of the spec should be generalized

As the manifest is no longer bound to any particular application type, it should be generalized:

Maybe just:

Manifest for Web Applications

Or:

Configuration Manifest for Web Applications

Suggestions welcomed.

The manifest as a compliant JSON Package

As this manifest targets a JSON format and was first created to manage "packaged apps" I immediately thought about the CommonJS / Node.js package format. I mentioned it during the F2F meeting but missed until now to fill it as an issue.

You'll notice that the main manifest format properties were already defined in the Package format:

  • name
  • description
  • version

CommonJS first defined Packages as:
http://wiki.commonjs.org/wiki/Packages/1.0

It is supported by different package tools and the npm node.js package.json format was mostly inspired from it:
https://npmjs.org/doc/json.html

Wakanda is also implementing its support at different levels:

  • server-side modules
  • IDE extensions
  • client-side "web pages"
  • client-side "web components"
  • widgets

I love this idea to push the developer to provide a bugs tracking URL (or email) as well as a list of maintainers.

The repositories property is interesting to provide either the original source repository as well as potential marketplace URLs from vendors for specific builds. This way, when a user click on a link to a manifest file, the browser can redirect to the most appropriate marketplace depending on the running platform (Android, FirefoxOS, iOS, ...)

The dependencies object relies on the package manager registry as is, which is a concern to me as those might not have all required components registered. Letting the option to provide repository URL in addition to the list of supported versions would be more "HATEOAS" (REST) compliant. In the context of Wakanda page packages, we define different types of dependencies like "devDependencies" (as node.js packages) or "loadDependencies" (used by the Ajax loader for CSS, JS and HTML template files). As for a packaged Web app, it is good to be able to define dependencies related to:

  • Web Components
  • libraries
    I think anyone can imagine how much copies of jquery mobile or sencha mobile are taking some place on the device limited storages

Note:
This issue is also related to this other closed one for which it looks I'm not the only one to be unsatisfied: #7 (Inconsistant naming of members)

Some security considerations no longer apply

The following security considerations no loger apply:

As this specification relies on the standardized heuristics for determining the content type of files defined in the [[!SNIFF]] specification, implementers need to consider the security considerations discussed in the [[!SNIFF]] specification.

And this one neither:

In addition, user agents need to be careful about trusting path components found in the manifest. Such path components might be interpreted by operating systems as pointing at security critical files outside the browsing environment proper, and naive unpacking of zip packages into the file system might lead to undesirable and security relevant effects, such as overwriting of system files.

Associate a web app with a manifest

There is currently no declarative means for an web application to associate itself with a manifest. This would be good for autodiscovery by the UA, for search engines, and for when javascript is disabled.

Something like:

<!doctype html>
<html config="/manifest/">
<!-- OR --> 
<link rel="appconfig | config | appmanifest | manifest | details | appdetails " src="/manifest/">

Missing references

@hollobit wrote: It would be good to change the reference information

--------- current text -------
[ECMAScript-MIME]
Reference not found.
[HTML-MIME]
Reference not found.

[JSON]
Reference not found.
[MIME]
Reference not found.

[SNIFF]
Reference not found.
[URL]
Reference not found.

--------- Proposed change -------

[ECMAScript-MIME]
B. Hoehrmann, Scripting Media Types, April 2006, Internet RFC 4329. URL: http://tools.ietf.org/html/rfc4329
[HTML-MIME]
D. Connolly; L. Masinter, The 'text/html' Media Type, June 2000, Internet RFC 2854. URL: http://tools.ietf.org/html/rfc2854

[JSON]
D. Crockford. The application/json Media Type for JavaScript Object Notation (JSON) (RFC 4627). July 2006. RFC. URL: http://www.ietf.org/rfc/rfc4627.txt
[MIME]
MIME is specified in six RFC: RFC 2045, RFC 2046, RFC 2047, RFC 4288, RFC 4289 and RFC 2049, which together define the specifications.

[SNIFF]
A. Barth; I. Hickson, Media Type Sniffing, IETF (Work in Progress). URI: http://tools.ietf.org/html/draft-ietf-websec-mime-sniff-03
[URL]
T. Berners-Lee; L. Masinter; M. McCahill, Uniform Resource Locators (URL), December 1994, Internet RFC 1738. URI : http://tools.ietf.org/html/rfc1738

Manifest format should support some way of including a splash screen

This feature is at risk. Unless we hear otherwise, this feature will be removed from the specification in the next few months.

Why is this at risk?

In the past, various vendors had expressed an interest in having a splash screen for when an app boots up. However, at least one implementer claims that it's possible to achieve this effect by using background_color + icon members. Additionally, browsers engines are able to boot up in sub 200ms, making it possible for authors to create their own splash screen experiences without needing to rely on this.

Use case

Because of the limited processing capabilities of some devices and the amount of time it takes to initialize a Web runtime, there can be a small - yet noticeably perceivable - delay between when the end-user starts an application and the application actually becoming available and interactive to the end-user.

Depending on the complexity of the application and the processing power of the device, this delay can range from a few milliseconds to a couple of seconds. When applications take more than a few seconds to load, it can be disorienting to end-users as nothing is displayed on the screen; leading to a poor user experience. Native applications overcome this issue by allowing developers to use a media file that is displayed the instant the application is launched. Such a file is commonly referred to as a "splash screen" or "launch image".

apps with multiple app cache manifest

The app cache manifest is per HTML file.

Even if a web app starts from a single HTML file, the one declaring the web app manifest, it often use other HTML pages.

the term "Web application" refers to a Web page (XHTML or a variant thereof + CSS) or collection of Web pages
http://www.w3.org/TR/mwabp/#webapp-defined

Additional pages can be used as:

  • dialog pages
  • iframe sub-pages
  • imported pages (cf "imports" in web components)

All of them may have different modular offline cache properties

If we want the web application manifest to list offline cache property files they should all be listed, and then potentially associated to their "owner", so appcache_path may become appcache_paths.

Then, another question comes to my mind, what about resources (css, script, images...) used by different pages and listed potentially differently in their cache manifest... Maybe is it a non-question and the behavior should be specific to the context of each page...

Indicate that an app "works off line"

Elsewhere @sicking said:

Something that we don't have a bug for, and which I think would be
critical, is the ability for developers to put information in the
manifest which explicitly states if an app is usable offline or not.

That way a developer can explicitly say that an app is not usable
offline. For example a packaged app might simply be a thin <iframe>
wrapper around a website. Or a hosted app might use appcache, but not
enough to actually be able to usefully work offline (I suspect this is
pretty common on desktop websites today given how crappy appcache is).

And in theory it could flag that a hosted app that isn't using
appcache still works offline. I don't think there are any situations
where that's true today, but in the future we might add cache-pinning
APIs and other features which could enable hosted apps to work offline
even without appcache.

Is name really required?

Currently, "name" is the only required member in the manifest (it must be present at the root - otherwise, the UA halts installation - behavior matches FxOS).

However, name could simply be implied as "undefined" when missing (or the UA could assign the application a name), so not to halt installation. For example, a UA could just use the domain name as the name (foo.com).

Having such draconian error handling seems like an anti-pattern on the Web.

Content rating and Age restriction

I think we need to support content rating and age restriction feature in the manifest format.

For example, developers must label their applications according to ratings guideline, as like as levels (or available ages)

  • Everyone
  • Low maturity
  • Medium maturity
  • High maturity

It can make two use cases.

  • application filtering on user devices (base on the user's age or user's policy)
  • application filtering on store side (base on the user's age or user's policy)

Reference :

Do we need a way to express "System requirements"?

In traditional software distribution, it is common for software developers to express minimum "system requirements" for an application, particularly in games. For example, DOOM 3 from apple's App Store has the following system requirements:

screen shot 2013-06-06 at 6 22 32 pm

As more sophisticated capabilities become disproportionally available to different devices and user agents, some apps stores on the Web have eluded to using something similar to warn or prevent users from purchasing software that their devices might not be able to execute.

Google's manifest format currently only asks developers to list two requirements (plugins or 3d).

"requirements": {
  "plugins": {
    "npapi": true
  },
  "3D": {
    "features": ["webgl"]
  }
}

The system application working group published a draft specification that contained required_features member in the manifest format ():

"required_features": ["touch", "geolocation", "webgl"]

*Mozilla may be using the "required_features" member above in their store, but it's currently not part of their documentation.

As can be seen from above, the list of requirements are both arbitrary encroaches on things that should be device independent (e.g., touch) and things that are a standard part of the Web platform (geolocation) - and, in the case of geolocation, that already include a permission model.

Some initial questions are:

  • Doesn't this sanction a means for developers to build experiences that exclude people (e.g., "touch only!")?
  • Shouldn't developers provide alternative fallback mechanisms for when features are not supported?

i18n - RTL/LTR issues

The use of JSON may pose some issues for developers wanting to use both RTL/LTR text (e.g., Hebrew or Arabic and english).

Typos introduced by #18

Quoting @clouserw:

Minor fixes: "locales keys matches" to "locales keys match" in the first sentence, and
"keys will not creates" to "keys will not create" in the last sentence. Thanks.

Orientation hinting

Should we allow orientation hinting in the manifest. Many games prefer to be run in either portrait or landscape, while other apps support "auto".

The spec should discourage vendors from extending the manifest format

Given that JSON does not support any mechanism for distributed extensibility (not even crappy namespaces), extensions to the manifest format be either discouraged or some extension points provided.

From #11:

We had an offline discussion with Marcos regarding this and we realised that there are other options than proposing to extend the manifest at a particular place:

  • filtering anything that isn't known by the runtime. The advantage is that it can help the application to know if a particular feature was taken into account and then emulate it but it might create issues with implementations adding new properties that would be shown and thus will have to be implemented by every one.
  • not showing the manifest at all. The advantage is that all problems are resolved but some applications would need information inside the manifest like the app title, icon and description. Typically a marketplace or a homescreen. But those applications would also prefer to have a manifest object that already has localized strings so we could also imagine some kind of processed manifest.

App URI should be RECOMMENDED but not required.

From the mailing list:

It should not be a requirement that packaged apps run off the app: URI scheme. The runtime spec should RECOMMEND it. That should address Giri's concerns and give more freedom of choice if implementers want to use something else (e.g., a local http server per application). Again, all that matters is that the results are predictable and interoperable, not that app:// is used.

fix links

Link at top of document don't quite work. Need to be fixed until we publish.

milestone of this spec

I think we need a milestone of this specification. Is it going to finish with runtime spec as a part of that ?

Divide sub-section and insert sub-section-title

@hollobit wrote:
I think it would be good to divide subsection and insert sub-section-title
It would be helpful to reader.

------ Proposed text (subsection number/title) ------

3.1 Validation

------ end ------

Certain error conditions can result in an application manifest being treated as an invalid manifest. An invalid manifest is an application manifest that is deemed to be non-conforming in such a way that it would not be possible for the user agent to continue processing (e.g., it can't be parsed by the JSON parser). In such a case, the user agent may report the error to the user in a user-agent-specific manner, may navigate to an error page to report the error, or may ignore the error and do nothing. In either case, when a step results in an invalid manifest the user agent must abort whatever steps caused the condition.

------ Proposed text (subsection number/title) ------

3.2 Fetching and Processing

------ end ------

The steps for fetching an application manifest are given by the following algorithm. This algorithm can be applied equally to manifests fetched from HTTP/S or those derived over the app URI scheme.

....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.