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.

67 Responses to Flex-based SQLAdmin for Google Gears

  1. Scott Hyndman May 31, 2007 at 5:23 pm #

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

    Great work Christophe!

  2. Andrew Spaulding May 31, 2007 at 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)

  3. Hilary Bridel June 1, 2007 at 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”

  4. KT June 1, 2007 at 9:21 am #

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

    Thanks

  5. based June 2, 2007 at 7:20 am #

    Java 6 include also a DB : Apache Derby

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

  6. Anne Knoche June 2, 2007 at 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

  7. mayo June 4, 2007 at 3:23 am #

    Great example, thank you!
    m.

  8. Oleg June 4, 2007 at 8:16 am #

    IE7 crashed finally =(

    • Elizaveta January 28, 2013 at 6:05 pm #

      bring a projector and one of those poitning sticks, like professor’s have so you make sure every one understands exactly what you’re referencing, you know. oh, and you should wear a hat.

  9. Aldo Loranca Meritano June 5, 2007 at 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.

  10. javaguy44 June 6, 2007 at 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

  11. laukbemsec June 18, 2007 at 8:39 am #

    Hello! Good Site! Thanks you! yguazruvttmfh

  12. CandyShopGirl October 9, 2007 at 2:52 am #

    Hello!

    What do you think about Tokio Hotel? >:)

  13. matt October 14, 2007 at 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

  14. DanielRaimon October 20, 2007 at 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

  15. FluiseBes October 30, 2007 at 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.

  16. orzelva November 17, 2007 at 12:38 pm #

    rolelc4tcc4t

  17. Matthew November 29, 2007 at 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?

  18. Jesse Jane January 16, 2008 at 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

  19. Yaz Okulu March 29, 2008 at 5:06 am #

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

  20. vodocliefealo December 18, 2008 at 8:40 am #

    sextir.com is a free porn site – We provide the world with free: porn videos,porn movies,xxx free movies,free porn,free sex.
    Best porn hub and tube on the web

  21. expensors January 7, 2009 at 12:28 am #

    sextir.com is a free porn site – We provide the world with free: porn videos,porn movies,xxx free movies,free porn,free sex.
    Best porn hub and tube on the web

  22. redben April 18, 2009 at 6:57 am #

    Nice as usual !

    PS: You really need a more robust spam filter…

  23. Miranda August 3, 2009 at 8:20 pm #

    Anyone tried this app?

    http://www.flexappsstore.com/index.php?route=product/product&product_id=62

    Looks decent. Would like some feed back.

    Thanks.

  24. Terry Sachetti July 24, 2010 at 1:16 am #

    Talk about simplicity, congrats on what you’ve created with this program, I agree with the other person it dose seem to have the linuxish feel to it. Keep up the awesome work I am sure to keep tabs on you.

  25. matbaa August 8, 2010 at 8:41 am #

    Looks decent. Would like some feed back.

  26. alternative health October 27, 2010 at 12:11 am #

    Looking Informative post.. might be this useful to programmers.

  27. engineering leveling April 25, 2011 at 10:16 pm #

    Great article. Thanks for a small tutorial

  28. Barry Nunes September 21, 2011 at 10:52 am #

    Nice blog Christophe. It’s very informative. This would be of great help to website developer and/or programmer.

    Thanks!

    Barry the Composite Door man

  29. matbaa September 30, 2011 at 12:01 pm #

    Congratulations on a very nice follow up this successful I would really tried Thanks

  30. www.kamenickenoviny.cz October 14, 2013 at 9:13 pm #

    Pretty! This was an incredibly wonderful article. Thank you forr providing this information.

Trackbacks/Pingbacks

  1. Coding with Scott » Google Gears For All! (A Flash-Gears Bridge) - May 31, 2007

    [...] 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. Google Gear and Flex / Apollo « Ocean Apple - May 31, 2007

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

  3. Google Gears and Adobe Apollo on SQLite at Flex Daddy - June 1, 2007

    [...] 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. [...]

  4. thebadtiming.com » Google Gears を Flex から使う - June 1, 2007

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

  5. La Zona Muerta » Blog Archive » links for 2007-06-01 - June 1, 2007

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

  6. Ajaxian » Flex-based SQLAdmin for Google Gears - June 1, 2007

    [...] 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. [...]

  7. Flex-based SQLAdmin for Google Gears « outaTiME - June 1, 2007

    [...] 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. [...]

  8. Flex-based SQLAdmin for Google Gears - June 1, 2007

    [...] 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. [...]

  9. Dev::Info - June 1, 2007

    Google Gears – první aplikace…

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

  10. Actionscript Hero - June 2, 2007

    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……

  11. oriolrius lifestream » Christophe Coenraets » Flex-based SQLAdmin for Google Gears - June 2, 2007

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

  12. Google Gears: Ganz große Kekse - June 3, 2007

    [...] 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. [...]

  13. paradox1x - June 3, 2007

    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……

  14. Vinny Carpenter’s blog » Daily del.icio.us for Jun 01, 2007 through Jun 02, 2007 - June 3, 2007

    [...] 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. [...]

  15. JEDI » Blog Archive » links for 2007-06-04 - June 4, 2007

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

  16. Utilidades para Google Gears | aNieto2K - June 4, 2007

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

  17. Web Site Design, Internet Marketing, Ecommerce - ryanj - links for 2007-06-05 - June 5, 2007

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

  18. SQL Admin - A client side database front-end (woot!) - June 5, 2007

    [...] 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. [...]

  19. Weblogger.ch » Blog Archive » links for 2007-06-07 - June 7, 2007

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

  20. Christophe Coenraets » Flex and Google Gears: sales force automation application with offline capabilities - June 8, 2007

    [...] 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. [...]

  21. Vinny Carpenter’s blog » Daily del.icio.us for Jun 02, 2007 through Jun 06, 2007 - June 8, 2007

    [...] 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. [...]

  22. Imrahil Weblog - Nokia N800 Internet Tablet » Archiwum » Pogłoski o mojej śmierci są stanowczo przesadzone… - June 10, 2007

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

  23. BorundaLLC » Flex-based SQLAdmin for Google Gears - June 10, 2007

    [...] 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. [...]

  24. Christophe Coenraets » SQLite Admin Application for AIR - June 13, 2007

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

  25. Web2.0Blog » Blog Archive » Flex e Google Gears - June 14, 2007

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

  26. links for 2007-06-14 | The Marketing Technology Blog - June 14, 2007

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

  27. SANIsoft - PHP for E Biz» Blog Archive » Into the fast (Google) gear - June 15, 2007

    [...] 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. [...]

  28. LGNewMedia » Cheers, Gears - July 8, 2007

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

  29. Googling with Gears « Two Ducks - August 18, 2007

    [...] 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 [...]

  30. SQLAdmin for Google Gears | Adobe AIR Tutorials - August 24, 2007

    [...] more @ http://coenraets.org/blog/2007/05/flex-based-sqladmin-for-google-gears/ [...]

  31. Google Gears | Adobe AIR Tutorials - August 26, 2007

    [...] more @ http://coenraets.org/blog/2007/05/flex-based-sqladmin-for-google-gears/ [...]

  32. nice - August 30, 2007

    nice…

    nice…

  33. 8865- sat « The Scotto Grotto - November 14, 2007

    [...] 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 [...]

  34. Flex Coding « Panduramesh’s Weblog - September 19, 2008

    [...] operations asynchronously http://code.google.com/p/as3mapprlib Christophe Coenraets :: Flex-based SQLAdmin for Google Gears Mapping Alex Styler :: Flex, Yahoo! Maps & RSS Feeds Menus David Coletta :: Accelorator [...]

  35. Flex with Java « anil4it - September 30, 2008

    [...] operations asynchronously http://code.google.com/p/as3mapprlib Christophe Coenraets :: Flex-based SQLAdmin for Google Gears Mapping Alex Styler :: Flex, Yahoo! Maps & RSS Feeds Menus David Coletta :: Accelorator [...]

  36. Pogłoski o mojej śmierci są stanowczo przesadzone… - Imrahil Weblog - Nokia N800/N810 Internet Tablet - March 4, 2009

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

Leave a Reply