Re: Contacts API concerns (RE: Draft minutes, 2011-01-15)

Hi,

> On 14.1.2011, at 2.04, ext Suresh Chitturi wrote:
> 
> 2) The ability to update and save as proposed in the draft is only a
> informative approach that relies on the external scripts and imposes a
> behavior on the user agent to register to a certain type of resource
> also means a format needs to be mandated (that we generally should stay
> away from it) for interoperability reasons. The user experience is also
> something I question e.g. are you going to see x number of dialogs for x
> number of contact saves by clicking on each of them. Further, the
> assumption of this approach is that the format generated by the script
> is the same format supported by the underlying implementation and this
> is not true with all the native address book formats, and as a result
> forces the implementation to convert from vcard in this case to the
> native format. There may be other issues, e.g. some address book
> implementations allow external implementations to only save contact
> information as new contact entries and not to existing entries, so you
> are only creating new entries as opposed to updating existing entries.

vCard Grouping allows multiple contacts to be contained within a single vCard file (vCard objects are simply concatenated together). vCard 2.1 spec [1] says (and "Differences From vCard v2.1" in RFC 2426 [2] does not overrule that):

[[

vCard Grouping

The vCard data stream can consist of multiple vCard objects. The vCard data stream can, sequentially, contain one or more vCard objects. In addition, the vCard data stream can contain a property whose value is a nested vCard. In both of these cases, each vCard object will be delimited by the vCard Delimiters. The vCard Reader conforming to this specification must be able to parse and process any of these combinations of vCard Groupings.

]]

In the Contacts API write use case, the app handling the vCard MIME type is a "vCard Reader" and thus if conforming to vCard 2.1 or 3.0 "must be able to parse and process any of these combinations of vCard Groupings". On a Mac using the Address Book app the user experience is a single click dialog that says: "Are you sure you want to import N cards? Cancel / Import".

For update operation (i.e. UID match) the dialog says "N cards are duplicates and will be updated. Review Duplicates / Cancel / Import". "Review Duplicates" provides means to visually review duplicates with options to "Keep Old / Keep New / Keep Both / Update". I feel this kind of review functionality is essential to warrant integrity of the contacts database. I also think it may be better handled by the app registered to handle the vCard MIME type and not by the API (I guess web developers would not like to deal with that complexity).

The proposed approach also enables better integration with the web architecture. E.g. using navigator.registerContentHandler() [3] web browser could suggest to handle the vCard writing using a web service in case the native app is having issues in handling the format (or based on user's preference).

Some information on vCard implementations is available at [4]. If someone has more up-to-date information on the overall implementation status, it'd be interesting hear.

-Anssi

[1] http://www.imc.org/pdi/vcard-21.txt
    http://www.imc.org/pdi/vcard-21.doc
[2] http://tools.ietf.org/html/rfc2426#section-5
[3] http://dev.w3.org/html5/spec/timers.html#dom-navigator-registercontenthandler
[4] http://microformats.org/wiki/vcard-implementations

Received on Friday, 14 January 2011 11:48:41 UTC