[dev] [commits] Horde branch newprefsui updated. 28ee4e1e04b5f112d4a308cda5c42053d61e412c

Michael M Slusarz slusarz at horde.org
Sun Apr 11 18:57:13 UTC 2010


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> commit 2b3abe74f295dcedc13498a2c86131c493977d4b
>> Author: Michael M Slusarz <slusarz at curecanti.org>
>> Date:   Wed Apr 7 09:17:03 2010 -0600
>>
>>    Convert turba addressbooks pref to json format
>
> Why, what's wrong with the current format, that doesn't require an  
> upgrade step?

It was a PITA to convert to/from the old serialized format, and then  
convert this intermediate object to the javascript format.  The code  
completely failed my general test: I couldn't reliably figure out what  
the chunk of code was doing even after staring at it for a few minutes.

Just as important, it is *much* easier for an admin to set a default  
value, rather than using tabs and newlines.
Providing an example that looks like this:

json_encode(array(
     'foo1' => array(
         'bar1',
         'bar2'
     ),
     'foo2' => array(
         'bar3'
     )
))

is much easier to visually parse than this (especially since all the  
rest of our configuration files are array/hash based, so an admin  
necessarily is familiar with the PHP array data structure):

"foo1\tbar1\tbar2\nfoo2\tbar3"

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list