headermask image

header image

Google Gears+OpenLaszlo (English)

As I’ve said it into my last post, I’ve made a little proof of concept of the use of Google Gears to store the contain of an OpenLaszlo grid into a local database.

The system is relatively easy to use with the DHTML runtime and I want to see how to integrate the same capabilities with Flash runtime.

I ll don’t going deep in the detail of the Google Gears technology, because it’s really easy to use.

Google Gears is a plugin for browser which provide some services to put a web application « offline », for this example I’ve only used the database storage capabilities that consist of an SQLite file stored on the user computer and all query are made in Javascript by the mean of Google Gears functions.

Link to the sources : GG.rar
The exemple is composed of 4 files :

index.html: the html file which embed scripts and laszlo application.
gears_init.js: the Google gears initialisation script provided by API.
OL_gears.js: a script with some hack to use GG with OpenLaszlo.
gg.lzx: the OpenLaszlo application

For the call of javascript function from OL I’ve used « flash.external.ExternalInterface.call() » function, so you need to use Flash8 runtime.

Because I wasn’t able to create or use Gears Javascript Object I’ve add a little javascript function in OL_gears.js to send Query and convert response into a multidimensional array like that « array[row_num][field_num]« .

I hope anybody will find a way to use Gears Objects into OL application because I’m not really satisfied of this solution or maybe we have to write a full javascript connector to gears.

If you want to see the result without install scripts you can watch a video here ;)

Si vous aimez mes articles, abonnez vous � mon flux RSS.

Un Commentaire

  1. Thanks, that was quick! Great work, I like that you offer a video of the application for the people who are too lazy to install everything on their system.

    Best regards,
    Raju

    1. raju on juin 5th, 2007 at 15 h 33 min

Publier un commentaire

Votre e-mail ne sera jamais publi� ou partag�. Les champs obligatoires sont marqu�s d'une *

*
*