On 06/18/2012 06:51 PM, Jonas Sicking wrote:
Please let's not create APIs which have different meanings depending on
if the caller is privileged or not. That's just confusing to developers
and to us. And makes future extensions to such APIs even more tricky.

IMHO:
* getInstalled() should *always* just returned the list of apps
installed by the current origin.
* mgmt.getAll() should not be callable from non-privileged callers, and
for privileged callers should return any launchable app. (My
understanding is that only "natively installed" apps are launchable?)
* mgmt.getAllSynced() or some such should return any app which is in the
registry but is not launchable

Would this satisfy all requirements?

Yes, I believe it would, though I would propose a tiny tweak:
- Keep all existing functions as they behave today.
- Add mgmt.getAllInstalled() to return only the set of apps that are installed and launchable.

Only reason being, I want to avoid the word "synced", as the API is potentially useful even without sync functionality if we go by the idea that the DOM registry contains all acquired apps and not just installed apps.

Does this sound reasonable to everyone?

Do we additionally need an API which lets the a privileged app natively
install an app which has been synced but is not natively installed yet?
It seems fairly useless to users if all we can do is to tauntingly
display app icons for apps which have been synced but can't be launched
because they are not natively installed. Or are we just going to grab a
link to the store from the app and then ask the user to re-install the app?

I think the UA can optimize this step, since it knows which apps the user has previously acquired, a call to install() for any of those apps can bypass the doorhanger (we can decide whether to restrict to privileged domains only), but no change to the API is necessary.

Also, the dashboard is expected not to display the app icons for apps that are not installed in the same manner as those which are. In our dashboard, at-least, there will be a clear demarcation and such apps will displayed in a "not on this device" tab much like the iOS store. The user can choose to install any of them on their current device if necessary, but there were no plans to allow seamless launching of these apps.

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

Reply via email to