Google Gears: Blob hate

This past week I’ve had a lot of face-time with Google gears, using it’s APIs and actually patching some of it’s implementation for my own needs (more about that some other time). I’m pretty impressed with the overall API, but I think it could definitely use some additions, namely in the Blobs and Desktop component.

Gears has decided that it will be the protector of all the sensitive native file-system resources that it exposes to pure Javascript, but the abstraction layers is downright frustrating. The main gripe I have is that there is no real way to deal with one of the masked “Blob” objects unless you pass it off to a method (read: native implementation, not javascript) that accepts Blob arguments. So effectively, to do anything meaningful outside of web-submitting the Blob, you will need to write some native C code that handles the Blob directly. It would be nice if we could handle a Blob in JS with the already written permission system in Gears.. but I suppose that’s still possible considering we’re only on release 0.4.

My other gripe is the openFiles() function in the Desktop component. It works fine, but File object it returns is basically useless (as it is just a wrapper around Blob, and they don’t even include the full filename, just the base filename). There should definitely be some more thought put into how Blobs, Files, and Javascript processing work together.. right now the loop is too tight, and it prevents a promising API from going much further, IMO.

Also read...

Comments

  1. Pingback: Read File Contents (Blobs) in GWT and Gears « Procbits

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>