[Sugar-devel] DataStore interface for HTML5 Activity

Gonzalo Odiard gonzalo at laptop.org
Thu May 2 08:40:08 EDT 2013


I think is ok if we limit what we can save to a staring, at least on a
first stage.
We can recommend use json too.

About the api proposed, will you get signals when the metadata is updated,
or should be the same "updated" signal as is the file was modified?
I am thinking on the modification on title or description in the journal,
right now we update the toolbar entries.

Gonzalo



On Wed, May 1, 2013 at 7:25 AM, <lionel at olpc-france.org> wrote:

> ** **
>
> Hmmm.  Finally, I wonder if we need to keep the file handling in the
> JavaScript Datastore interface.****
>
> I’ve wrote 5 Sugar activities. Each time I’ve only used the Datastore via
> read_file/write_file functions and each time it was not to store a file but
> to store a "state". And most of the time this state could be translated to
> a string (JSON, XML, CSV, …).****
>
> In fact the only case where a file could be interesting is when we handle
> binary content (like images). But, at worse it could also be translated to
> string and this string could be store in the state.****
>
> ** **
>
> I’m interested by feedbacks from the list about this point: do you think
> that file handling is need for the Datastore?****
>
> ** **
>
>                 Lionel.****
>
> ** **
>
> ** **
>
> *De :* Daniel Narvaez [mailto:dwnarvaez at gmail.com]
> *Envoyé :* mardi 30 avril 2013 19:06
> *À :* Lionel Laské
> *Cc :* sugar-devel at lists.sugarlabs.org
> *Objet :* Re: [Sugar-devel] DataStore interface for HTML5 Activity****
>
> ** **
>
> Doesn't seem to be implemented in webkigtk yet and the work sort of
> stalled apparently
>
> https://bugs.webkit.org/show_bug.cgi?id=58443****
>
> ** **
>
> On 30 April 2013 18:42, Daniel Narvaez <dwnarvaez at gmail.com> wrote:****
>
> The firefox guys are apparently not very keen about the w3c File stuff
>
> https://hacks.mozilla.org/2012/07/why-no-filesystem-api-in-firefox/****
>
> ** **
>
> On 30 April 2013 18:27, Daniel Narvaez <dwnarvaez at gmail.com> wrote:****
>
> As you point out, the main problem here is the concept of file.
>
> My understanding is that with the new file APIs you are basically
> requesting a sandboxed filesystem, then you can write and read there as you
> please. Though I don't know how the shell would then have access to that
> filesystem, to be able to move the files into the datastore.
>
> Chromium must be doing something similar to allow writing stuff to google
> drive using those interfaces, though they implemented their interfaces
> directly into Webkit.****
>
> ** **
>
> On 30 April 2013 17:34, <lionel at olpc-france.org> wrote:****
>
> Hi all,****
>
>  ****
>
> As we decided to our IRC meeting last week, I’ve wrote a first draft
> proposal for the JavaScript DataStore interface [1].****
>
>  ****
>
> Basically the interface just match the DataStore existing interface. ****
>
> The main issue is related to the concept of "file":****
>
> -          File is at the heart of the DataStore concept: the DataStore
> is nothing else than a place to store files and metadata related to files,
> ****
>
> -          But: file handling is not a common practice in JavaScript!****
>
>  ****
>
> The good news is that HTML5 comes with few File system and Files handling
> functions [2][3].****
>
> I didn’t test it but it should work on WebKit.****
>
>  ****
>
> Do not hesitate to comment/update.****
>
>  ****
>
>                 Lionel****
>
>  ****
>
>  ****
>
> [1] http://wiki.sugarlabs.org/go/HTML5_activities#Datastore ****
>
> [2] http://dev.w3.org/2009/dap/file-system/pub/FileSystem/****
>
> [3] http://dev.w3.org/2009/dap/file-system/file-writer.html****
>
>  ****
>
> ** **
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel****
>
>
>
>
> --
> Daniel Narvaez****
>
>
>
> ****
>
> --
> Daniel Narvaez****
>
>
>
>
> --
> Daniel Narvaez****
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130502/5964327d/attachment-0001.html>


More information about the Sugar-devel mailing list