[sugar] Proper D-Bus usage (was Re: October 29 - Tarballs due for 0.83.1)
Bert Freudenberg
bert
Wed Oct 29 13:32:49 EDT 2008
On 29.10.2008, at 09:57, Marco Pesenti Gritti wrote:
> On Wed, Oct 29, 2008 at 5:30 PM, Bert Freudenberg <bert at freudenbergs.de
> > wrote:
>> On 29.10.2008, at 03:42, Marco Pesenti Gritti wrote:
>> I don't see how it would be "inconsistent" that when an activity
>> saves a
>> "title" meta-data property which obviously is a string, and it
>> resumes, to
>> expect it will be returned as a string and not magically converted
>> to a byte
>> array. An activity should not have to care about the DS's internal
>> representation.
>
> I think Tomeu point is that the DS should know nothing about the type
> of the metadata properties and interpretation of the data blob (the
> array of bytes) should be left entirely to the activities.
It's not a data blob. The mandatory meta-data properties are well
defined. This is (or should be) part of the Sugar specification. Like,
the Journal has to agree with activities that the meta data property
named "title" is actually a Unicode string. It is *not* left to the
activities.
Besides, if you throw away the knowledge that something is a string,
then you lose quite a bit of useful information. Like, full text
search pretty much requires knowing what is a string and what not. You
may want to read about comparing Unicode strings - it certainly is not
as simple as comparing byte arrays. Let alone if we want to do fuzzy
search.
>> And after all, the meta data is declared to be a{sv} instead of
>> a{say}
>> precisely to accommodate appropriate types for the values.
>
> Yeah but the interface was written for a datastore which had a notion
> of metadata property type (although a very bad one). The new one does
> not.
Then change the API signature and do not pretend it did not break.
Any comment on the debugability concerns?
- Bert -
More information about the Sugar-devel
mailing list