[OpenAjaxMobile] Analysis of W3C's latest geolocation APIs and proposals for how to generalize

Paddy Byers paddy.byers at gmail.com
Mon Sep 15 09:59:59 PDT 2008


Hi,

> I thought that we had discussed async vs sync back in the May/June
> timeframe when I had originally suggested that all APIs should use an async
> model, but people pointed out similar concerns as you have below, and as I
> remember the async proponents (perhaps just me) conceded that in some cases
> a synchronous APIs makes sense. But if doThis(), doThat() and doTheOther()
> all have potential response delays, then the developer is stuck with having
> to deal with the async programming complexities.
>
Yes - if the methods really are asynchronous then the programmer has to deal
with it.

All I was saying was:
- the code that expects async is necessarily a lot uglier than the code that
expects sync;
- therefore, if it is known that a method really is synchronous then it
would be good to make it explicit and document that in the API;
- there might be an advantage in having a different style of API to make it
more explicit than just by documentation.

I know I agreed with it last time around :) but having tried it out for real
I realise it can end up being pretty messy.

Paddy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/mobile/attachments/20080915/c69f316f/attachment.html 


More information about the mobile mailing list