NEW KEP: Update 'contact' object

Thomas Brüderli bruederli at kolabsys.com
Fri Sep 16 15:31:07 CEST 2011


Alain Abbas wrote:
> Thomas Brüderli a écrit :
>> Alain Abbas wrote:
>>
>>> Could be mor simple to put preferred="1" in the<email />  entry instead
>>> to make a duplicate entry<preferred>  that is always hard to maintains.
>>> Example
>>> <email displayname="aa" preferred="1>aa at aa.com</email>
>>> <email displayname="bb">  bb at bb.com</email>
>>>
>>
>> Also in this case inconsistency can arise:
>>
>> <email displayname="aa" preferred="1">aa at aa.com</email>
>> <email displayname="bb" preferred="1">bb at bb.com</email>
>>
>>
>>> like that e are sure to not have duplicate infos and false info
>>> in case of :
>>> <email displayname="bb">  bb at bb.com</email>
>>> <preferred>
>>> <email>toto at toto.com</email>
>>> </preferred>
>>>
>>
>> In either case, the client altering a contact object is responsible to
>> ensure consistent data whereas the latter case is IMO preferable because
>> it doesn't require iteration over all<email>  nodes for both reading the
>> preferred email address and setting/changing
>>
> yes but you have not inconsistency in the datas just in the logic (2
> preferred) that is more easy to handle than
> a different address in <preferred> tag. Now about iteration 70% of
> contacts have only one email and perhaps
> 20% have 2 or 3 , that is not a big iteration :-)

Fair enough, I agree.
Having a preferred flag also adopts the concept of vcards.

~Thomas




More information about the format mailing list