Re: ISSUE-3 (async-style): Asynchrnonous calls style [APIs General]

On Aug 31, 2009, at 21:12 , Arve Bersvendsen wrote:
> On Tue, 25 Aug 2009 15:08:36 +0200, Device APIs and Policy Working  
> Group Issue Tracker <> wrote:
>> ISSUE-3 (async-style): Asynchrnonous calls style [APIs  General]
>> Raised by: Robin Berjon
>> On product: APIs  General
>> We need to pick a common style for asynchronous calls (handles for  
>> cancellation, DOM Events or not, etc.).
> I'll ask the same question I did for ISSUE-2: Do we really? Whether  
> something is a callback or event, or is cancellable or not would  
> depend on the particular use-case, no?

I'm fine with that if that's the general feeling of the WG, but at the  
very least rough guidelines about when to use events or callbacks  
could help. The WebApps WG recently tailspinned into several weeks of  
not-always-friendly discussion about events versus callbacks  I'd  
rather we avoided that.

Here's a quick proposal, feel free to add to or subtract from it:

  - Every asynchronous call should be cancellable, unless there are  
overriding technical issues that make the action irreversible (e.g.  

  - Events will be used whenever there is a solid use case indicating  
decentralised observation or the need for simulating the action  
(synthetic events); otherwise callbacks will be used.

Robin Berjon -

Received on Tuesday, 1 September 2009 09:58:16 UTC