← Back to team overview

tomdroid-dev team mailing list archive

Re: tomdroid's storage-redesign && what do we want to keep in the database as a note?


On Tue, Nov 17, 2009 at 1:50 PM, Benoit Garret
<benoit.garret_launchpad@xxxxxxxx> wrote:
> On Tue, Nov 17, 2009 at 8:19 PM, Olivier Bilodeau
> <olivier@xxxxxxxxxxxxxxxxx> wrote:
>>> > 1- store the whole note instead of just note-content in the database
>>> > This way we won't lose addins metatags, full note encryption support
>>> > will be
>>> > possible, etc. Also, parsing the few lines of metadata on each load
>>> > won't be
>>> > that big of a penalty since its the note's content that is always the
>>> > biggest.
>>> I'd be in favor of this solution, provided we do not find any blocker.
>>> Xml is a complex beast and I'd sleep better at night knowing someone
>>> knowledgeable about the format handles the decoding for us.
>> I was thinking about it this morning. I have a new question: what do you get
>> when you ask for a note using Tomboy's REST API? Do you ask for metadata and
>> note-content separately or is it all together?
> It's one request to get a JSON object containing the metadata in
> various fields and the note content as xml in another field, like the
> example at http://live.gnome.org/Tomboy/Synchronization/REST#line-78
> The note-content field is exactly what's between the note-content tags
> in a xml note, this was why I decided to put it as-is in the database.

This is not totally accurate.  In the REST API, we remove the title
from the <note-content> XML, whereas in a Tomboy .note file, the title
is repeated in the first line of the <note-content>.