Friedger's Blog : September 2008

Previous Next
2

How many Gears does Curl have?

Posted by friedger Sep 29, 2008

Last week I visited a Google Developers Day and attended a talk about Gears. Unfortunately, Curl wasn't mentioned when presenting RIA platforms. However, I thought that it might be nice to compare the features of Google's Gears Plugin (version 0.4) and the Curl Platform. Some people will say that I am comparing apples with pears but both are extensions to the browser and make web applications feel more like desktop applications. So is there anything that Curl can't do but that Gears can? Sure, you can communicate with a javascript page from within Curl but is there anything that should be included in the Curl API?

Looking at the Database API and WorkerPool API of Gears, I have no doubts that Curl can do the same: SQLite is included in Curl and Gears and asynchronous events are handled very nicely in Curl.

Http requests can be sent synchronously or asynchronously on a high or a low level in Curl, so the Gears' HTTPRequest API does not add anything new. And the same holds for Blobs: In Curl you are free to use binary data in the same way as any other kind of data.

More interesting are the LocalServer API, GeoLocation API and the Desktop API of Gears.


The Desktop API allows to createShortcuts and openFiles. While Curl allows to open local files since the first release the feature to create shortcuts has only been added recently, namely in Curl Nitro.

For the GeoLocation API there is no equivalent in Curl. One could use web services to determine the user's location but this is not as easy to use as the Gears solution. This API is missing in Curl! If privacy is not an issue it would be nice to have this feature.

Finally, Gears' LocalServer API provides means to capture resources. This feature does not exists in Curl as such. However, using the macro {with-file-caching-style} and the local data of applets it is quite easy to create a similar API. I am not sure whether there are that many use cases for this particular API as the Curl language contains already enough means to handle external resources. Probably the LocalServer API is most often used to implement something similar to Curl's occasionally connection client (OCC) feature.Therefore, I am not missing this API of Gears.

I installed Gears on my computer, but haven't used it yet and I am not sure whether I will in the future. However, I noticed a popup dialog asking for permission to use Gears to store files on my computer while visiting a web blog site. I denied for different reasons. First, I didn't see any reason why the blog site wants to store files on my computer. Second, the popup suggests that only the LocalServer module will be enabled but the tick under this message implied permission to use all Gears features. I am much more happy with Curl's security model. Curl applets only need user permission when writing files and this can be handled on an individual basis. Applets do not require the status of a privileged applet.


As Gears is only in release 0.4 there might be much more APIs to come. Let's see and use Curl while waiting..

2 Comments 0 References Permalink