-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 03/11/2015 12:40 PM, Benjamin Francis wrote:
> It's a bit more than just a bookmark registry in my opinion. A 
> bookmark is a shortcut to a single URL which opens in a browsing 
> context. A web app on the other hand can consist of multiple URLs. 
> Installing an app into the app registry should register that app 
> (identified by manifest URL) as handling a particular collection
> of URLs (defined by the "scope" property) using an application
> context (a browsing context with the manifest applied) in its
> preferred display mode (defined by the "display" property). You can
> also bookmark/pin a page (we don't have to have a registry in Gecko
> for that), and that bookmark could open in an application context
> (if it falls under the scope of an installed app) or a browsing 
> context.

I asked a few non-programmer people how they define an "app" vs a "web
app". They pretty much agreed that and "app" was software "on your
phone" that runs even if the device isn't connected to the internet,
whereas a "web app" requires an internet connection.

If I apply their expectations for "apps" to Firefox OS, the only
change from regular web browsing we need to make is to allow for web
content to "run" even when not connected to the web. (Sure, the app
may "run" just enough to show an error message about no connection,
but at least it is a "branded" error message and not a browser error.
We see this behavior in existing iOS and Android apps).

With plain web browsing, the default behavior is shotgun caching of
content with least-recently-used (LRU) deletes and the minimal set of
API perms. The manifest is our primary mechanism for overriding all
of those browser behaviors. I don't think we need an app registry at
all as long as we make bookmarking "manifest aware":

* When a user loads a page that links to a manifest, we load the
manifest, follow the caching instructions, check signatures, and set
up access to sensitive APIs (i.e. prompting the user for permission if
needed).

* When a user adds a bookmark, we check for a manifest and follow the
caching instructions therein. If the page was already loaded, we just
mark the cached files so they will get skipped during the LRU calculatio
n.

* When a user loads a bookmark, we check for a manifest and follow the
presentation, api, and caching instructions therein. This meets the
"runs even when not connected" expectation by instructing the browser
to load from the cache first.

* When a user deletes a bookmark, we check for a manifest and unflag
the cached files so that they are once again considered during LRU.

It's a grand unified theory of (web) apps. What's nice about thinking
along these lines is it is device independent. It would work anywhere
the web does, assuming the browser is allowed to cache files locally.

- --dave
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJVEzfuAAoJEJ7v31qiCP4gloQP/i4bdQpbcvZpzb7XC8Nht+JI
uOcqRi9IMwpAeUDQm5qaMV4cR3iOAA6SMCfL1dvF32FJHqOl00BrUK7wCSa0q1Al
Y29bUGsF2NsZga7PvbljTvKd08y9+d42VHpPzZx9G5tlnU7++PpVYckOwRgDZitn
ESAJQwYIwHCmIEzWLoehYKDNMKVglWQcOlEdDeer2U2RmhEzIKAaaYmr9u3KmgPe
aTmXV3ETM2WqgHtdRAnCoSu59QNblgvufwN+MypdJp6pMcYsHte27w1JahDIsKLT
CeYsPdgauBLn9r/e032Q+ABJKVUV8nQe4UzbJ1jurZYQ3lBe7JHWGdH9B0JCl3fJ
Vc1Fj99OzGZZRKhueh2AvLvJE1wy1KdpmTNbZQC7nDfjlsSrWwGR6+3tZgUgdjnX
qf8rFuX6o+mf5HK0X4LXcGOBY4UZVbLZUQQNSCQAQ9WjHWdr09qJrSHmwpfMCgEK
I5KsxKSS5TqpLUyE0twRbNJ58JBwX9VQ4qBARG2Kl/aprX3ZP0N4RLHsYqUs4kQ3
HnV2GcIQkeZVAETaGPuRdKJCCcu85N+t0EO+DHrRCIWaMXcRS/66cBu64qgid0s6
ow7BtNqz6I4XEkY73EmUh88ez1rrZgNrw/MvMc2F/ZmmSX5jCzzTVBSeYH9XsoTv
Nr25T3rvJtBx1na4SiH/
=4ymH
-----END PGP SIGNATURE-----
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to