Peter Dolanjski
Product Manager, Firefox OS
MozillaYou can see the breakdown here: v3 App ModelHello All,There have been a number of discussion threads around the details pertaining to the various forms of apps that are needed as we move forward with new architecture (based on permissions, presence of a manifest, etc.). A few of us (product, engineering, partner engineering, Marketplace) got together to try to assemble a simple description of what each distinct category is for and when they would be used. I plan to publish this on one of the v3 wikis, but before I do I just wanted to open it up for comments/suggestions.Feel free to comment right in the doc.In addition, I'll summarize it here in case you prefer some email dialogue on it:Web Site
Description:Vanilla web site with no app manifest.Distribution Channel(s):1. Any web server
2. Indexed by Marketplace (hosted elsewhere)Why would a Developer choose this option?- Just a web site that should be used inside the browser. (no point in enumerating all reasons for building a web site)Why would a Developer *not* choose this option?- Want to provide a more "native" experience
- Need access to sensitive APIsSigning Required?NoMozilla Review?Yes, for Marketplace indexed content onlyImpact of Changes to Existing AppsnoneProposed User Experience on v3Discovered through browsing (any web server), searching or via Marketplace with “open” button. Can optionally pin a page (not “site”) to the homescreen which will open in a browser window.Web App
Description:Standards-based web app with W3C web app manifest.Distribution Channel(s):1. Any web server
2. Indexed by Marketplace (hosted elsewhere)
3. Hosted by Marketplace (TBD)Why would a Developer choose this option?- Want content to run standalone outside the browser on multiple platforms.
- No need to package assets
- If no sensitive APIs required, no extra signing processWhy would a Developer *not* choose this option?- Developers coming from native consider hosting a service provided by the MarketplaceSigning Required?NoMozilla Review?Yes, for Marketplace indexed/hosted content onlyImpact of Changes to Existing AppsExisting hosted apps should use the new manifest format going forward, but new FxOS versions should support legacy app versions.Proposed User Experience on v3Discovered through browsing (any web server), searching or via Marketplace with “open” button. Can use instantly in the browser and optionally pin to the homescreen to use as a standalone app (in an app window with fullscreen, standalone or minimal-ui display mode). Details TBD
Firefox App
Description:Signed web app (when privileged API access needed), at least initially Firefox* specific. W3C web app manifest with moz-prefixed extensions, inside a hosted streamable package.Distribution Channel(s):1. Any web server
2. Indexed by Marketplace (hosted elsewhere)
3. Hosted by MarketplaceWhy would a Developer choose this option?- Easier to handle offline support until ServiceWorkers lands and gains support
- Need access to Firefox* specific privileged APIsWhy would a Developer *not* choose this option?- Requires signing by Marketplace (for privileged apps)Signing Required?Yes (for privileged apps, TBD)Mozilla Review?Yes, for Marketplace indexed/hosted content onlyImpact of Changes to Existing AppsExisting packaged apps need to be converted to new format. Developers need to adhere to new format going forward.Proposed User Experience on v3Discovered through browsing, searching or via Marketplace via “open” button. Can use instantly in the browser and optionally pin to the homescreen to use as a standalone app (in an app window with fullscreen, standalone or minimal-ui display mode). Some permissions may require app installation (TBD).Legacy (Open Web App)
Description:“web”, “privileged” and “certified” apps with an Open Web App Manifest. Packaged in a signed zip file (except “web” type).Distribution Channel(s):1. Marketplace
2. Any web server (“web” type only)Why would a Developer choose this option?- Supporting an old appWhy would a Developer *not* choose this option?- Requires review by MarketplaceSigning Required?Yes (except web type)Mozilla Review?Yes, for Marketplace indexed/hosted content onlyImpact of Changes to Existing AppsnoneProposed User Experience on v3Hosted apps should work the same as web apps in v3 adhering to the display mode. Packaged apps likely won’t be supported but we’ll need to automatically convert them to work with the new UX.
Thanks,
Peter Dolanjski
Product Manager, Firefox OS
Mozilla
As an update, I've created a wiki for the summarized app types here:Please let me know if you disagree with anything as this will be used as the basis for the app types that we will support going forward.
https://wiki.mozilla.org/Gaia/App_Definitions#App_Types_Proposal
Thanks,
_______________________________________________ dev-b2g mailing list dev...@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-b2g
| |
| Natalia Martinez-Winter Sr Marketing Manager Firefox OS nat...@mozilla.com +33 6 888 11 959 natalia...@skype.com twitter : @martinezwinter |
_______________________________________________
dev-b2g mailing list
dev...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g
I agree with everything Jonas said there. Let's eliminate the fictional differentiation between web sites and web apps. Not only will this simplify terminology, but it will simplify explanations of how to do things at a fundamental level. MDN is currently increasingly peppered with "You can use this in your Web site or app to..."; eventually it gets cumbersome.
The main thing that I think we should do is abandon the term "app".
The term "app" is often associated with things like "installing" and
"app store", both of which I'd like to move away from.
But I think we generally should just consider web content as web
content. I.e. as normal websites that you can browse to. Having a W3C
or a FirefoxOS manifest shouldn't really make a big difference in what
that content can do, what permission it gets or what UI it has.
The second complexity is "pinning". I think we should allow users to
pin websites to the homescreen. This should be possible for *any*
website, whether it has a W3C manifest, a FirefoxOS manifest, the
Apple-invented <meta> tags, or none of the above.
When the user pins a website I think we should grant it some
additional permissions automatically. Mainly we should grant it the
ability to store more data, run in the background using the
BackgroundSync and Alarm APIs and maybe create notifications.
It might
also give that content special UX treatments, such as the ability to
show up in webactivity picker, or to run without a URL bar.
But all those capabilities should come with getting pinned. It should
not be related to if the website has any types of manifests or not.
Additionally, ideally the capabilities, like storage, BackgroundSync
API, Alarm API and notification API, is something that we make
available to all websites. However if the user hasn't pinned the
website the user would get prompted. So really the pinning is mainly
about UX. I.e. the prompting UX disappear, and the website can choose
to hide URL bar or appear in the webactivity picker.
We discussed this in another thread, but Jonas convinced me that pinning will not have any security side-effects, and I’ve updated the permission model to reflect this [1].
I assume “installation” will remain for add-ons and will remain as gate to implicit permissions.
On 11 Jun 2015, at 10:39 pm, Benjamin Francis <bfra...@mozilla.com> wrote:On 11 June 2015 at 06:17, Paul Theriault <pther...@mozilla.com> wrote:We discussed this in another thread, but Jonas convinced me that pinning will not have any security side-effects, and I’ve updated the permission model to reflect this [1].To clarify, have you decided that granting extra storage, the ability to run in the background and the ability to appear in the web activity picker will have nothing to do with whether or not the site is pinned, so Gecko doesn't need to know?
Does that mean that the user will always be prompted for these permissions instead?
Thats correct. Though you are mixing things up a little here by throwing in Activities. That’s not a permission, that’s just something that is registered at install time. (In the same way that system message listeners are declared). Without an install step, we will need a new way for apps to register anything that was previously registered in the manifest that we want to continue to support.
We will definitely need a FirefoxOS-specific API which tracks the list
of URLs that have been bookmarked, and which maybe caches manifest
information as needed. Likely this API would also need to send
notifications when pins are added/removed.
One thing that is tricky is that in the new manifest spec the manifest
URL is meaningless. In order to update an icon we need to re-download
the HTML file and see what manifest URL it points to.
This is especially problematic if the user "pinned the website" rather
than "pinned the page", i.e. if we bookmarked the start_url rather
than the current page URL. What do we do if the page on the start_url
doesn't link to a manifest? Or links to a different manifest? Does the
spec address this?
I definitely am hoping that the entire navigator.mozApps API goes
away. At least I don't see any needs for it for FirefoxOS.
> * activities
Yeah, the system app needs to use the notifications mentioned above to
track when a website gets pinned and that website uses a manifest
which contain activity data.
> * appcache_path (I guess we will deprecate this, but we might want to
> replace it with service worker integration)
I don't think this is needed. The user has visited the website anyway,
and so the appcache should have already been installed.
> * customizations (I guess we can keep this for the manifests of addons)
I'm not sure what you mean by "customizations".
But yes, I'm sure we'll need APIs for managing the list of installed
addons exposed to various gaia apps, like settings and system app. And
we'll need to expose something to the amo website as well.
> * datastores-owned/datastores-access (I hope we can deprecate DataStore
> eventually but we need it for now)
I'm hoping that we can deprecate DataStore as well. In the meantime I
don't think we should expose it to privileged content. Hence I think
we can do whatever we need to here in order to keep allowing Gaia to
work. No need to be overly concerned about the APIs.
> * fullscreen (I think we can replace this with display_mode and handle it in
> Gaia for pinned sites only)
> * messages (as you mentioned)
> * orientation (I think we can support this in Gaia for pinned sites)
I'm not sure what you mean by this. But if needed we can automatically
grant websites some permissions when they are pinned. Not sure if
we'll do this in gecko or in gaia. I don't think that matters really,
we should do whatever's easiest to implement.
We will definitely need a FirefoxOS-specific API which tracks the list
of URLs that have been bookmarked, and which maybe caches manifest
information as needed. Likely this API would also need to send
notifications when pins are added/removed.
One thing that is tricky is that in the new manifest spec the manifest
URL is meaningless. In order to update an icon we need to re-download
the HTML file and see what manifest URL it points to.
This is especially problematic if the user "pinned the website" rather
than "pinned the page", i.e. if we bookmarked the start_url rather
than the current page URL. What do we do if the page on the start_url
doesn't link to a manifest? Or links to a different manifest? Does the
spec address this?
Yeah that's really what I'm getting at. Do we still need window.navigator.mozApps.install() ? If not then how do we do all the other things that we currently register at install time? Do we need new (internal?) APIs for those things?
* activities
* appcache_path (I guess we will deprecate this, but we might want to replace it with service worker integration)
* customizations (I guess we can keep this for the manifests of addons)
* datastores-owned/datastores-access (I hope we can deprecate DataStore eventually but we need it for now)
* fullscreen (I think we can replace this with display_mode and handle it in Gaia for pinned sites only)* messages (as you mentioned)* orientation (I think we can support this in Gaia for pinned sites)
So in practice, if we don't do any of this, and simply treat pins as
bookmarks, there will be relatively few downsides.
If, on the other hand, we stick pins in the application registry, the
main thing that would immediately happen is that pinned content would
get its own cookie jar. I.e. as soon as you pin something you'd get
automatically logged out.
We could definitely change that. But given the relatively few
downsides of just using the bookmarks database I think we should do
that for now. That way we'll have more freedom to modify what is
stored since it can be handled entirely within Gaia.
Once we have that more figured out, and once we have more of the new
security model in place, it definitely sounds like a plausible option
to simply use the apps registry to store pins. Part of that will
definitely be to remove the existing data-jar-per-app policy that we
currently have.
That sounds like something that should fit in the 3.0 release without
too much hassle.
> We might say that the biggest difference is that a site no longer requires a
> manifest in order to be pinned/installed. But all of the features we've
> talked about which require Gecko to know about a pinned site actually
> require a manifest anyway.
I don't think that's true. We can get a nice-looking icon and a icon
name using just <meta> and <title> tags. I would expect that that
covers by far most of what people will put in the manifest.
And there are *far* more websites out there that has that has
apple-touch-icon <meta> information, than have manifests.
Generally speaking, CDNs use a new URL any time you want to change the
file contents.
Very few developers will think about how to update the icon when they
originally deploy the website. That won't be something that they think
about until it actually comes time to update the branding, which often
won't be long after they first deploy.
> It says that the user agent may
> "periodically check if the contents of a manifest has been modified (e.g.,
> by honoring HTTP cache directives associated with the manifest or by
> checking for updates after the web application has been launched)".
Does any other implementation actually do that?
Yeah, the spec definitely needs to be updated here. As long as the
spec allows the manifest to be hosted on a different origin, and thus
on a CDN, we should assume that the manifest URL is meaningless and
won't be kept valid for any extended period of time.
Nothing that the spec says here will make a difference short of
requiring that the manifest is same-origin.
I don't think it's at all feasible. And it would still cause the user> But how should we handle the case where the user navigates to a Firefox App
> in the browser (either a legacy hosted Open Web App or a new signed
> streamable packaged app), and then tries to pin it? Would we a) just pin it
> like a web site using metadata provided by the page and not provide any
> additional features, keeping the existing separate install flow in the
> Marketplace or b) require that all Firefox Apps provide a manifest link
> relation in their pages pointing towards a manifest with proprietary Mozilla
> properties, somehow detect the difference, then internally install the app
> via the exiting Apps API?
> I would have a strong preference for b), but I'm not sure how feasible that
> is from a BizDev/Evangelism point of view. We'd need to be clear on how this
> is going to work very soon to set those balls rolling.
to get logged out when you pin the site, which likely means that it's
worse for the user than simply doing a). I don't think very many
hosted apps use the extra permissions which means that the difference
between a) and b) is very little, other than that b) logs you out.
For streamable packaged apps in 2.5 we're most likely going to grant
apps all the needed permissions upon simply navigating to the app. So
again b) makes very little difference other than logging the user out.
> and it's mostly Firefox Apps that
> Gecko needs to be made aware of.
I'm not sure what you mean by this.
I definitely think that we should
make use of the apple meta tags to the same extent that we do
manifests. I believe the fennec team has found that the get a much
better user experience for their "bookmark to homepage" when making
use of the apple tags.
Given this, and given that I don't actually see a downside to
re-downloading the HTML page again, I definitely think that that's
what we should do.
Also keep in mind that for websites that don't use manifests, but
instead use meta tags, we'll have to re-download the HTML.