In lieu of a long response, here's the semi-abbreviated answer/clarification:

- You're misunderstanding the nature of apps: apps can run as web pages, but 
they can also run "outside" the browser as chromeless pages (think Mozilla 
Prism), on an Android device as its own standalone app (with an app icon in the 
applications menu), and on Firefox OS (and any other WebRT platform) as an app 
(as you'd expect an app to work). Add-ons are browser-only, meaning that they 
wouldn't make sense outside the browser. If Facebook built an app, for 
instance, you wouldn't expect to have to run Firefox to open it. It works 
externally from the browser.
- If you'd like to see apps in action outside of the browser-centric context 
that you've probably come to expect from using desktop Firefox, check out the 
Firefox OS Simulator: 
https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Using_Firefox_OS_Simulator
- The APIs that a privileged app has access to are effectively the same as the 
ones that a normal (unprivileged) web app has access to (with some exceptions, 
namely access to private user data and system settings). The difference is that 
when the app is packaged, we (Mozilla) can approve the code that powers the app 
and prompt the user to accept the app's permissions at install time rather than 
when the app is used. I.e.: if Instagram made an app, it would ask for camera 
permissions when you hit the install button rather than every time you wanted 
to take a picture.
- An add-on is built to supplement or modify pieces of the browser chrome. This 
means that the APIs that add-ons use are a.) very browser-specific (tabs, 
history, favorites, etc.) and b.) very low-level. Apps, on the other hand, use 
very high-level APIs (like WebGL, XHR, getUserMedia, etc.). Unlike an add-on, 
apps use web languages that run anywhere: the web is the same on Android, 
Firefox OS, OS X, Windows, etc. When building an add-on, your code needs to be 
tailored to the browser (and sometimes platform) that it's intended to run on. 
It's very unlikely that a Firefox add-on will run well on Firefox for Android 
out-of-the-box, while an app in the same scenario probably will run at least 
"ok".

With regard to your suggestions:

- You can add a license or EULA to your app by writing a start/splash screen. 
There are no plans to add this to the manifest. If you submit your app to the 
Marketplace, we have fields for a privacy policy and description, which you 
could use to include or link to your license/EULA. 
https://marketplace.firefox.com/developers/docs/mkt_submission
- The Firefox Marketplace *does* have an API. 
http://zamboni.readthedocs.org/en/latest/topics/api.html
- The WebRT API allows any site to install apps. The Firefox Marketplace is not 
special: it is simply a web app (not a packaged app) that uses the WebRT API to 
install apps to the device. There are exceptions regarding packaged app 
signing, but there are plans to remedy that in the future. 
https://developer.mozilla.org/en-US/docs/DOM/Apps


Thanks for taking the time to dive into the apps ecosystem. Feel free to send 
any questions my way and I'll be happy to clear up any confusion that you might 
have regarding the difference between apps and add-ons.


Matt Basta



----- Original Message -----
From: "Brett Zamir" <[email protected]>
To: [email protected]
Sent: Saturday, December 29, 2012 11:40:02 PM
Subject: Open Web Apps, Addons, and Privileges

Hi,

In my view of an ideal Web, one should be able to write apps in one 
manner and not be forced to deal with packaging files just to gain 
privileges if the user permits. I like how Open Web Apps can apparently 
be turned into packaged apps by pointing a URL to one's site at the 
Marketplace. And I like how there is the potential for privileged apps 
(albeit only with packaged apps).

What I don't understand, however, even after reading 
https://developer.mozilla.org/en-US/docs/Apps/FAQs/About_apps#What_is_the_difference_between_an_app_and_an_add-on.3F,
 
is:

1) Why there needs to be any distinction between the Addons SDK and web 
apps? It would seem logical to make as much possible shared between them 
and just flip a switch (e.g., a package setting) to get it to work as an 
addon. Yes, the SDK might be Mozilla-specific now, but there is no 
reason I can see that it would perpetually need to be...

2) Why sites apparently cannot request permissions for installation 
without packaging themselves first? Why can they not simply ask for this 
privilege and allow sites to use Cache manifests, or even just the 
ability to be required to run online?

Unless you are open to adding both of these, I intend to keep working on 
https://github.com/brettz9/asyouwish/ to allow regular websites the 
ability to gain access to the Addons SDK APIs upon user permission, 
whether they are targeted to open upon each browser restart or only upon 
being explicitly visited.

(I have just added this functionality to AsYouWish, but these addon 
features are not yet documented or fully tested, and there are a few 
small issues to work out.)

So, in order to leverage the same APIs as much as possible, by allowing 
"addons", I'd like to use the same Apps Manifest settings as at 
https://developer.mozilla.org/en-US/docs/Apps/Manifest (albeit supplied 
via a call to the addon's global AsYouWish.requestPrivs() requireJS-like 
API instead of inside of a zip file), but I noticed that there is no 
formal way (documented at least) to specify a choice of (ideally 
potentially multiple) licenses (or license URLs), and for my "addons", I 
would like to allow users to be informed of this status when using or 
"installing" such content. If this is not currently possible, is Mozilla 
open to adding it, ideally in my view having predefined choices in 
addition to extensibility? Maybe EULAs too... Perhaps this could lead to 
an automated way for users to discover and fork the code at another site 
which advertised itself as being under a given license.

(I could also envision an API by which sites could register themselves 
as Marketplaces which could also be requested of the user so the user 
could choose from different marketplaces (which might display featured 
"addons" within AsYouWish's "addons" manager, etc.)--perhaps enabling a 
whole site to be deemed trustworthy upon initial permissions--in 
addition to being allowed to install individual apps from different web 
sites/pages.)

Best wishes,
Brett

_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to