Flex-based SQLAdmin for Google Gears

sqladmin.gif

I spent the last few days building a Flex/Google Gears integration demo that Kevin Lynch demonstrated during the Gears announcement today at the Google developer day in San Jose.

The demo is a Flex-based Sales Force Automation application that uses Gears to save data to a local SQLite database while offline, and automatically synchronizes back with the server when you reconnect to the network. There is a browser-based version of the application using Gears for the local database access, and an Apollo version using Apollo’s built-in SQLite support. I will post the code and more information about the application after cleaning it up a little bit.

In the meantime, here is a SQLAdmin app that I built to help me manipulate my Gears database as I was building the demo. It allows you to look at the content of your Gears SQLite database and execute any type of SQL statement (Click New Query in the menu).

You can run the application here. Per Gears’ security model, the database you create will be saved on your computer in a coenraets.org sandbox (databases cannot be shared across different domains). View source is enabled: right click and select View Source.

To use the app with your own databases, download the application here, and run it from the same domain as the database you wish to inspect.

If you are a Flex developer, this application also higlights the key steps to start using Gears in your own Flex application:

  1. Import Google’s gears_init.js in your HTML wrapper
  2. Add a couple of JavaScript functions. In this application I only defined one generic executeSQL() function that is called by the Flex app as appropriate.
  3. Your Flex app integrates with gears through ExternalInterface. In this app I abstracted the calls to Gears in a simple Database.as class

The source code is available here

NOTE: Make sure you install Google Gears before running the app.

Comments

52 Responses to “Flex-based SQLAdmin for Google Gears”

  1. Coding with Scott » Google Gears For All! (A Flash-Gears Bridge) on May 31st, 2007 5:13 pm

    [...] Update Just thought I’d mention that Mike Chambers mentions on his blog that Apollo will include a SQLite database for similar functionality as what I have written, and Christophe Coenraets has code for Google Gears integration with Flex 2. [...]

  2. Scott Hyndman on May 31st, 2007 5:23 pm

    I wish that pingbacks would update themselves. I hate grammatical errors!

    Great work Christophe!

  3. Andrew Spaulding on May 31st, 2007 5:51 pm

    Hi Christophe, this is fantastic! And exactly what I was hoping to implement today… after attending the Google Developer Day yesterday in Sydney I’ve got so many ideas for implementing cross browser to Apollo applications using the same local storage …

    This kind of technology should make Apollo and Flex all the more appealing to developers and application designers.

    Go team!

    Andrew
    Adobe (AU)

  4. Google Gear and Flex / Apollo « Ocean Apple on May 31st, 2007 8:11 pm

    [...] Flex-based SQLAdmin for Google Gears [...]

  5. Hilary Bridel on June 1st, 2007 12:27 am

    Great stuff Christophe,
    unfortunately, when I run your demo, in IE I get “db is null or not an object” and in Firefox I get “db has no properties”

  6. Google Gears and Adobe Apollo on SQLite at Flex Daddy on June 1st, 2007 12:44 am

    [...] Well to give you a taste of what’s possible Christophe Coenraets has released a Flex-based SQLAdmin for Google Gears with full source code. Remember to have Gears installed prior to running the example live on his domain. [...]

  7. thebadtiming.com » Google Gears を Flex から使う on June 1st, 2007 12:58 am

    [...] Adobe Flex のテクニカルエバンジェリストの Christophe Coenraets 氏のブログで公開されている FlexベースのSQLiteのアドミンツール(Flex-based SQLAdmin for Google Gears)。この管理画面は、Google GearsでインストールされるローカルSQLiteデータベースへアクセスし、管理ツールとしてのインターフェースを提供するもの。テーブルの操作やSQLの実行などができます。 [...]

  8. La Zona Muerta » Blog Archive » links for 2007-06-01 on June 1st, 2007 1:29 am

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears (tags: opensource google Flex2 Flex gears) [...]

  9. KT on June 1st, 2007 9:21 am

    I missed the live webcast yesterday. Is there somewhere I can view a recorded version of it?

    Thanks

  10. Ajaxian » Flex-based SQLAdmin for Google Gears on June 1st, 2007 11:00 am

    [...] Christophe Coenraets always brings the goods when you need a quick demo. He created the SQLAdmin tool for Google Gears that Kevin Lynch demonstrated yesterday. [...]

  11. Flex-based SQLAdmin for Google Gears « outaTiME on June 1st, 2007 1:12 pm

    [...] Flex-based SQLAdmin for Google Gears Christophe Coenraets always brings the goods when you need a quick demo. He created the SQLAdmin tool for Google Gears that Kevin Lynch demonstrated yesterday. [...]

  12. Flex-based SQLAdmin for Google Gears on June 1st, 2007 1:15 pm

    [...] Christophe Coenraets always brings the goods when you need a quick demo. He created the SQLAdmin tool for Google Gears that Kevin Lynch demonstrated yesterday. [...]

  13. Dev::Info on June 1st, 2007 2:36 pm

    Google Gears - první aplikace…

    Google Gears byly uvolněny včera a už dnes máme první vlaštovky, které s nimi dokáží pracovat.

  14. Actionscript Hero on June 2nd, 2007 12:55 am

    Flex-based SQLAdmin for Google Gears: by Dion Almaer - Ajaxian…

    Dion Almaer wrote: “Christophe Coenraets always brings the goods when you need a quick demo. He created the SQLAdmin tool for Google Gears that Kevin Lynch demonstrated yesterday. This app does have the side effect of showing me that I……

  15. oriolrius lifestream » Christophe Coenraets » Flex-based SQLAdmin for Google Gears on June 2nd, 2007 4:06 am

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears [...]

  16. based on June 2nd, 2007 7:20 am

    Java 6 include also a DB : Apache Derby

    http://java.sun.com/javase/6/webnotes/features.html

  17. Anne Knoche on June 2nd, 2007 8:41 am

    Christophe -
    This is off topic (so apologies up front), but I don’t know how else to get feedback to you. As a newbie, I VERY much appreciate the sample apps you provide on Flex. They are extremely helpful in getting off to a good start with best practices as well as getting inspired about what is possible with Flex. On the downside, I have to say I am VERY discouraged about the lack of traffic on the Adobe Technical Support Forum for Flex. (I’m currently having some problems with your FDS 30 Minute Test Drive package which have gone unanswered for many days ( see http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=583&threadid=1272438) Many of my other posts on the forum have gone unanswered for months. In contrast the Flash forum is extremely active. Questions get answered in a matter of hours and sometimes even minutes. I have tried to get feedback to other Adobe evangelists on this concern, but no one seems to respond. I work for a very small company, so we can’t afford to hire Adobe Consulting Services or get an expensive support contract to get answers to our questions. We are very dependent on the Forums. I believe the Flex market could explode to the size of the Flash market if you help us small folks trying to cross over from Flash get up the learning curve faster. I think you need to “seed” that technical support forum with answers from you Adobe experts to build the community. Of course, any help you could provide by answering my FDS Test Drive question on the Forum would be GREATLY appreciated.
    humbly submitted for your consideration,
    Anne

  18. Google Gears: Ganz große Kekse on June 3rd, 2007 6:55 am

    [...] Christophe Coenraets hat einen Flex-basierten DB Client entwickelt, mit dem man die gespeicherten Datensätze betrachten oder manipulieren kann (oder man nimmt den SQLite Database Browser). Super zum debuggen von JavaScript Anwendungen die Gears nutzen. Die Daten landen dann z.B. im Firefox Profil unter: MozillaFirefoxProfilesekmgrjgq.defaultGoogle Gears for Firefox. [...]

  19. paradox1x on June 3rd, 2007 11:07 am

    Some Google Gears Linkage…

    Christophe Coenraets: Flex-based SQLAdmin for Google Gears (niiiiceeee) tecosystems: The Gears That Power the Tubes: The Google Gears Q&A (via……

  20. Vinny Carpenter’s blog » Daily del.icio.us for Jun 01, 2007 through Jun 02, 2007 on June 3rd, 2007 5:23 pm

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears - The demo is a Flex-based Sales Force Automation application that uses Gears to save data to a local SQLite database while offline, and automatically synchronizes back with the server when you reconnect to the network. [...]

  21. JEDI » Blog Archive » links for 2007-06-04 on June 4th, 2007 3:23 am

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears (tags: google gears googlegears) [...]

  22. mayo on June 4th, 2007 3:23 am

    Great example, thank you!
    m.

  23. Oleg on June 4th, 2007 8:16 am

    IE7 crashed finally =(

  24. Utilidades para Google Gears | aNieto2K on June 4th, 2007 4:22 pm

    [...] SQLAdmin para Google Gears, versión desarrollada en Flex de este interface que nos ayuda a gestionar gráficamente nuestra base de datos. [...]

  25. Web Site Design, Internet Marketing, Ecommerce - ryanj - links for 2007-06-05 on June 5th, 2007 7:24 am

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears (tags: flex google gears googlegears sqlite sql opensource) [...]

  26. Aldo Loranca Meritano on June 5th, 2007 4:51 pm

    Hi Christophe, im Aldo, from mexico, new at flex, ive been looking for help and but nobody can help me, ur my last hope, my problem is simple, please help me.

    my problem is: when i populate a datagrid and use a customize componente as item renderer there’s a glitch when scrolling, seem like the calculation of the mask of datagrid fails, and i start to see like a white background who step out the panel or pop up where the datagrid is in. i tried override data propertie, use functions like invalidateDisplayList, properties or size, i also catch the scroll event and lots of things, nothing work, please help me.

  27. SQL Admin - A client side database front-end (woot!) on June 5th, 2007 5:20 pm

    [...] SQLAdmin manages to be an interesting concept project on two hype technologies at once: a Flex front-end to Google Gears browser-embedded-SQLite database. Launched almost together with Google Gears, SQLAdmin makes life A LOT easier, when developing ‘offline capable applications’ using Gears. The entire technology stack is just a little bit weird: a binary application (a Flash application) that acts as a front-end to a database engine that runs locally, INSIDE the web browser and is accessed via a Javascript library using regular SQL statements. It couldn’t get stranger than that. Can’t wait to see the new billionaire ideas that will emerge from this technology soup. [...]

  28. javaguy44 on June 6th, 2007 12:15 am

    Hi Chris,

    Sorry for the posting here about this, but I was looking for the source code for an article you wrote:
    http://www.adobe.com/devnet/flex/articles/struts.html

    I don’t suppose you would be willing to:
    1. post it
    2. email to me? javaguy44 at yahoo dot com

    I haven’t ruled FDS out, but I’m doing a proof of concept on the remoting, and naturally want to cover all the alternatives.

    Thanks

  29. Weblogger.ch » Blog Archive » links for 2007-06-07 on June 7th, 2007 1:32 am

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears Un exemple d’application en Flex exploitant le tout nouveau GoogleGears (tags: google googlegears flex examples) [...]

  30. Christophe Coenraets » Flex and Google Gears: sales force automation application with offline capabilities on June 8th, 2007 7:54 am

    [...] As a follow up to my previous post, here is the sample Sales Force Automation application I built to demonstrate the Flex/Google Gears integration, and that Kevin Lynch demonstrated during the Google Developer Day keynote last week in San Jose. [...]

  31. Vinny Carpenter’s blog » Daily del.icio.us for Jun 02, 2007 through Jun 06, 2007 on June 8th, 2007 5:33 pm

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears - The demo is a Flex-based Sales Force Automation application that uses Gears to save data to a local SQLite database while offline, and automatically synchronizes back with the server when you reconnect to the network. [...]

  32. Imrahil Weblog - Nokia N800 Internet Tablet » Archiwum » Pogłoski o mojej śmierci są stanowczo przesadzone… on June 10th, 2007 1:15 pm

    [...] jako, że całość danych PIM’a przechowywanych będzie w bazie SQLite planuję napisać niego wizualnego SQLAdmina, opierając się na takim projekcie [...]

  33. BorundaLLC » Flex-based SQLAdmin for Google Gears on June 10th, 2007 1:29 pm

    [...] Christophe Coenraets always brings the goods when you need a quick demo. He created the SQLAdmin tool for Google Gears that Kevin Lynch demonstrated yesterday. [...]

  34. Christophe Coenraets » SQLite Admin Application for AIR on June 13th, 2007 8:59 am

    [...] The application is based on the SQL Admin for Google Gears I posted recently. [...]

  35. Web2.0Blog » Blog Archive » Flex e Google Gears on June 14th, 2007 5:17 am

    [...] Coenraets mette a disposizione anche i sorgenti dell’applicazione nel suo blog. [...]

  36. links for 2007-06-14 | The Marketing Technology Blog on June 14th, 2007 11:23 am

    [...] Christophe Coenraets » Flex-based SQLAdmin for Google Gears (tags: sql mysql flex googlegears google admin) [...]

  37. SANIsoft - PHP for E Biz» Blog Archive » Into the fast (Google) gear on June 15th, 2007 2:44 am

    [...] Google Gears now allows developers create web applications that can run offline. Perhaps this is the beginning of mass consumption of the offline technology. Google makes it easy with excellent tutorial, if that is not enough there are more examples already floating around. [...]

  38. laukbemsec on June 18th, 2007 8:39 am

    Hello! Good Site! Thanks you! yguazruvttmfh

  39. LGNewMedia » Cheers, Gears on July 8th, 2007 2:36 pm

    [...] The first one is SQLAdmin for Gears, which I cannot pretend to understand, though there is some explaination here. [...]

  40. Googling with Gears « Two Ducks on August 18th, 2007 3:04 am

    [...] There’s a very nice flash-based Google Gears sql admin application which provides a nice way of administering the Google Gears databases (which I’ve downloaded and installed locally at http://localhost/gears/gearsadmin/sqladmin.html). Posted by jcdarwin Filed in Wellington [...]

  41. SQLAdmin for Google Gears | Adobe AIR Tutorials on August 24th, 2007 1:37 am
  42. Google Gears | Adobe AIR Tutorials on August 26th, 2007 5:08 am
  43. nice on August 30th, 2007 3:54 pm

    nice…

    nice…

  44. CandyShopGirl on October 9th, 2007 2:52 am

    Hello!

    What do you think about Tokio Hotel? >:)

  45. matt on October 14th, 2007 6:36 am

    there is also a large and comprehensive database of 500 ajax scripts available with over at ajaxflakes’s ajax scripts compound

    thought i should add it might be helpful to others…

    http://scripts.ajaxflakes.com

  46. DanielRaimon on October 20th, 2007 8:23 pm

    Hi all!!!

    Video from broken private site of USA, hackers have worked on glory!! Only +18!! The others, the request to no dist
    urb! ;) Saw similar references to your site coenraets.org, therefore has decided to place to you! If will consider inappropriate - please, remove it!!! :)

    chicago erotic il services chicago erotic il services
    chicago erotic il services chicago erotic il services
    chicago erotic il services chicago erotic il services
    arabic woman sex arabic woman sex
    bdsm dom fem toons bdsm dom fem toons
    free local adult chat free local adult chat
    anal hardcore housewife milf anal hardcore housewife milf
    anal porn sex toon anal porn sex toon
    game porn xxx game porn xxx
    lesbian sex video web site free lesbian sex video web site free
    yahoo adult pic yahoo adult pic
    comic book porn comic book porn
    latino man porn latino man porn
    latino man porn latino man porn
    latino man porn latino man porn
    adult dildo sex toy adult dildo sex toy
    hardcore porn pay site hardcore porn pay site
    game real sex game real sex
    adult male porn adult male porn
    thumbnail anal fucking thumbnail anal fucking
    club jersey new sex club jersey new sex
    young gay teen tgp young gay teen tgp
    porn dvd store porn dvd store
    black tit fucking black tit fucking
    free anal movie video free anal movie video
    disney toons porn disney toons porn
    free anal movie video free anal movie video
    adult dvd lesbian adult dvd lesbian
    halle berry sex scene halle berry sex scene
    free cartoon sex pic free cartoon sex pic
    com free movie sex com free movie sex
    rose asian porn star rose asian porn star
    free xxx lesbian video free xxx lesbian video
    disney toons porn disney toons porn
    lesbian foot young lesbian foot young
    big pussy teen tit vids big pussy teen tit vids
    free gay sex xxx free gay sex xxx
    picture of anal cancer picture of anal cancer
    free gay sex xxx free gay sex xxx
    black free india pic porn sex black free india pic porn sex
    home made movies.com porn home made movies.com porn
    teen lesbian eating pussy teen lesbian eating pussy
    adult spy cam adult spy cam
    picture of anal cancer picture of anal cancer
    horny teen tit horny teen tit
    free amateur porn clip free amateur porn clip
    gay twinks boy gay twinks boy
    erotic teen photo erotic teen photo
    gay guy latin young gay guy latin young
    reality porn site list reality porn site list
    gay guy latin young gay guy latin young
    free teen porn sex picture free teen porn sex picture
    gay lesbian teacher gay lesbian teacher
    black gay site black gay site
    reality porn site list reality porn site list
    black porn star heather hunter black porn star heather hunter
    japanese lesbian porn japanese lesbian porn
    adult care day goal outcome program adult care day goal outcome program
    black gay porn site black gay porn site
    adult archie comic adult archie comic
    ebony and ivory porn ebony and ivory porn
    ebony and ivory porn ebony and ivory porn
    ebony and ivory porn ebony and ivory porn
    peliculas porn gratis peliculas porn gratis
    rpg sex game rpg sex game
    lesbian hentai picture lesbian hentai picture
    hardcore position sex hardcore position sex
    black double anal black double anal
    gay wrestling video gay wrestling video
    free sample of gay black sex free sample of gay black sex
    free adult married personals free adult married personals
    adult pussy pic adult pussy pic
    hq bdsm hq bdsm
    gay porn star picture gay porn star picture
    hq bdsm hq bdsm
    older gay male older gay male
    japanese adult magazine japanese adult magazine
    girl first lesbian girl first lesbian
    sex pussy game sex pussy game
    porn psp trailer porn psp trailer
    gay porn star picture gay porn star picture
    adult swinger video adult swinger video
    nice ass tit nice ass tit
    hardcore xxx gay sex hardcore xxx gay sex
    book store and adult theater book store and adult theater
    arab gay video arab gay video
    book store and adult theater book store and adult theater
    ebony hardcore anal sex ebony hardcore anal sex
    india gay sex india gay sex
    bdsm beginner bondage domination good guide sadomasochism submission bdsm beginner bondage domination good guide sadomasochism submission
    old lesbian kissing old lesbian kissing
    adult fun video adult fun video
    lick my anal cream pie lick my anal cream pie
    lesbian strap threesome lesbian strap threesome
    arab gay video arab gay video
    beauty black dior porn star beauty black dior porn star
    anal gallery gay photo sex anal gallery gay photo sex
    sex home video porn sex home video porn
    anal gallery gay photo sex anal gallery gay photo sex
    free gay fuck video free gay fuck video
    classic adult film classic adult film
    girl on girl lesbian girl on girl lesbian
    gay glory hole movie gay glory hole movie
    girl in kissing lesbian shower video girl in kissing lesbian shower video
    home video adult xxx home video adult xxx
    sex home video porn sex home video porn
    anal sex gallery anal sex gallery
    free adult group free adult group
    erotic sex story archive erotic sex story archive
    free gay picture sex woman free gay picture sex woman
    erotic sex story archive erotic sex story archive
    free gay picture sex woman free gay picture sex woman
    sex machine ebony sex machine ebony
    bbw free porn trailer bbw free porn trailer
    gay and lesbian association gay and lesbian association
    florida erotic massage florida erotic massage
    free adult video movie free adult video movie
    college sex photo college sex photo
    lesbian party sexy lesbian party sexy
    sex video photo sex video photo

  47. FluiseBes on October 30th, 2007 12:26 pm

    You don’t really need or want that lifestyle, it might hurt y’all slowly more…….Just tell him you
    don’t wanna repeat something your not too proud of z7uas.

  48. 8865- sat « The Scotto Grotto on November 14th, 2007 8:21 am

    [...] I can use at the new gig - Flex-based SQLAdmin for Google Gears ( Google Gears (BETA) is an open source browser extension that enables web applications to provide [...]

  49. orzelva on November 17th, 2007 12:38 pm

    rolelc4tcc4t

  50. Matthew on November 29th, 2007 4:29 pm

    Can you help me load your source code? I’ve tried the import feature but it says it was not a valid export from Flex.

    How would I go about creating a project with your code in it?

  51. Jesse Jane on January 16th, 2008 3:29 pm

    I really like the simplicity that you’ve created with the program, I also like the look & feel, very linuxish :D

    Cheers

  52. Yaz Okulu on March 29th, 2008 5:06 am

    hello everybody. my Japanese is not good but it seems like a very nice web site. thanks

Leave a Reply