RE: Question from Webkit developer related with the use cases of Contacts API

What follows does not represent the opinions of my employer and is merely some thoughts I had last week.

Dom wrote:
http://lists.w3.org/Archives/Public/public-device-apis/2010Feb/0109.html

... before I joined this list.

> I came up with the following main use cases (which obviously are a 
> personal perspective, and very much up for discussion):
> • auto-filling a form with my personal address and/or phone number 
> (for getting sent an item I just bought, making an hotel reservation, 
> using an eGov service)

I consider this something which a good browser should be able to learn on its own, without having access to my address book.

[Scenario]
I just joined RIM and moved to Toronto. My brand new computer had an address book program which probably had an API which allowed access to its data. But the reality is that my address book didn't have the data that was needed. On the other hand, my browser saw me enter that data repeatedly into various forms.

A good QoI in my book would have learned the fields I needed (especially my Canadian postal codes -- which I still don't know and have lots of trouble finding). ... Some of my browsers actually did a tolerably good job of learning some of my data.

> • auto-filling a form with one postal address from someone I know (to 
> send them a gift)

This seems like a case where supporting some amount of drag and drop and the ability to show the user a blob and let the user select a part of the blob would be sufficient.

If I could drag and drop a contact from my address book to an input field and have the browser ask me which pieces I wanted to include, I'd be rather happy.

This is what I got when I tried to drag my Zakim business card (Microsoft Outlook 2007) to Wikipedia's search field (Mozilla Nightly 7.0a1 2011-06-28):

    Zakim Bus: +1 (617) 761-6200

That was actually sufficiently close to my needs. If I needed to strip away the label, I could easily do so. Note that it obviously doesn't make sense to drag a business card to Wikipedia, but I didn't have a better drop target handy :). 

I'd imagine that when browsers start supporting <input type="phone"> or whatever, drag and drop could automatically deal with showing the user a logical choice if necessary or automatically selecting the only one if there's only one.

> • getting auto-completion on an email address of someone in my 
> addressbook (for on-line email, sending invitation to on-line 
> services, sharing content from a given Web site) [this would obviously 
> also apply to other fields, e.g. phone number, social network account, 
> etc]

Again, I wonder if drag and drop isn't sufficient here. It might be the case that you're using a crippled platform which doesn't have drag and drop (Maemo?), in which case, perhaps the platform needs a working clipboard (I hear Windows Phone 7 will get a clipboard eventually!).

> • sharing an arbitrary number of email addresses with an on-line 
> social network to expand my network

For kicks, I tried selecting 3 contacts in Outlook and dragging them to data:text/html,<textarea> in Nightly, and it gave me their cards.

To get more control of my data, I was able to select view>current view>list (in Outlook), and then adjust which columns it showed and then drag the rows I wanted to Nightly. The result was total control (I'm actually rather happy about this, and it required essentially 0 lines of code - well 1 for the data url).

Now, most people aren't likely to spend the time doing this, but maybe they'd benefit from browsers providing a way let them filter data before it's sent to web pages. Certainly for CSV or Tab Delimited data, it wouldn't be too hard.

Again, in this case, if someone had <input type="email" multiple>, then ideally the browser would automatically either collect all such fields, or give me a summary:

<a href title="click to view">10 contacts with primary email</a>; <a href title="click to view">5 contacts with multiple email addresses</a> <select><option>include all<option>include primary<option>include personal<option>include business</select>; <a href title="click to view">2 contacts don't have email address</a> ...


I'm not certain that offering such APIs is really the right path forward.

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Received on Monday, 4 July 2011 14:31:05 UTC