Re: [contacts] Comments on editors draft of Contacts API

> • all the interfaces defined in the API are annotated with
> [NoInterfaceObject] [2] ; I think it’s may make sense for the Contacts
> interface depending on the mechanism used to secure the access to the
> addressbooks, it’s probably not appropriate for many of the other
> interfaces; for instance, I don’t see how one would add a contact right
> now, since one cannot instantiate the Contact interface; was there a
> rationale for hiding the interface object? Maybe some of the interfaces
> can/should remain hidden through convenience functions, but they’re not
> defined in the API right now

To quickly chime in: while possible to implement complete CRUD for
Contacts on most devices for PhoneGap we opted to make Contacts a
read-only api for the time being due to ambiguities between platforms
for the user interfaces.


> • I think all the attributes in Contact but “name” should be annotated
> with a “?” since they are optional [3]; likewise, all the attributes in
> ContactName should be marked with “?” but “formatted”

+1


> • I am a bit nervous about using SQL as the formal language to describe
> the filtering algorithm; I think given that the filtering we’re doing is
> rather simple (OR / AND / LIMIT / OFFSET), I would go with a prose or
> mathematical description on the set of known contacts.

Also of note, in PhoneGap, we found that the only common way to search
contacts across devices is via the 'name' attribute. Any other
techniques would require loading all contacts into an in memory array
for searching which has the potential for really bad performance.
Unfortunate we have to be limited by the lowest common denominator:
the iPhone! ;)

Received on Monday, 30 November 2009 16:13:41 UTC