Re: [w3c/webpayments-payment-apps-api] The relationship between payment apps and service workers (#33)

> I'm not too worried about this. In fact, it seems worse that users would have to manage the lifecycle of yet another thing.

I don't entirely follow this concern. By "users" did you mean the end users or the users of the API?

End users are already going to be managing, installing, removing, and interacting with Payment Apps in a number of ways that may be different from typical service workers -- if for no other reason than in how they are surfaced. In any event, end users likely won't have any understanding of the implementation or architecture details here (or care).

If you meant users of the API, what is the extra overhead that they would incur with option 1 vs. option 2? Perhaps this isn't true for all Payment App implementers, I would expect most to see Payment Apps as their own (sub)class of thing, even if their behavior inherits greatly from service workers. But this is why an inheritance model seems to make sense. It doesn't make sense to me that any service worker may show up in the list of Payment Apps that I could use to complete a payment request. However, that doesn't mean that we *necessarily* need to establish a new class of thing in order to make that distinction manifest. This is just an explanation for why inheritance seems to make sense to some of us here.

> If it's a JS context that wakes up to handle an event, potentially without a page on the origin being open, that's a service worker. This is why things like push, sync, and potentially alarms & geofencing live there. The precedent is already there, and by design.

I think only option 3 would cause a Payment App not to be a service worker; for options 1 and 2, it's just a question of how the necessary extensions are achieved. Of course, you link to the extensibility section on service workers which is definitely the primary source of guidance we should attempt to follow here. We should assume that a lot of thought has been put into this previously and try to use the framework put forward. So thank you for the pointer.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments-payment-apps-api/issues/33#issuecomment-242894480

Received on Saturday, 27 August 2016 04:07:57 UTC