SalesBuilder on AIR: Local Database, Data Sync, and Native Drag-and-Drop

NOTE: This version of the application is now obsolete. I posted a new and significantly improved version here.

airsb.png

SalesBuilder is a sample Sales Force Automation application that allows you to work offline (using the SQLite database embedded in the AIR runtime), and synchronize data with the server when you are back online.

In addition to using a local database, SalesBuilder also demonstrates other interesting features such as native drag-and-drop between an AIR application and the desktop, as well as native drag-and-drop between an AIR application and other desktop applications such as Word and Excel.

This is the AIR version of the browser-based application I recently posted here. The database-related instructions below are therefore very similar.

In this hosted version, I removed the server component (to avoid having to watch all the bad things that can happen to a shared demo database). An XML document plays the role of server data. You work offline and the changes you make are saved to your local SQLite database. A simple data synchronization mechanism allows you to initially populate your local database, and informs you of the changes that would be sent to the server.

Click here to install the application.

Guided Tour

Working with the local database

  1. Start the application.
  2. Click the Search button in the left drawer. Notice that there is no data (you haven’t populated your local database yet).
  3. Optionally start the AIR SQLite Admin tool.
    • Click “Open Database”
    • Navigate to your “Application Data\salesbuilder\Local Store” directory, select salesbuilder.db and click Open.
    • Click “New Query” in the menu bar.
    • Type “select * from account” or “select * from contact”: no data.
  4. In the SalesBuilder app, click the “Sync” button in the menu bar.
  5. When the synchronization process completes, click the “Search” button again: You now have data.
  6. If you started the SQLite Admin tool, click the “Execute” button again and notice that your local database has been populated.
  7. In the SalesBuilder app, double-Click “Acme” in the search results.
  8. Note that this is an MDI type of user interface. The list of open windows (panels) is available under “Open Items” in the drawer. You can click an item to restore it.
  9. Make some changes to the Acme data (for example, change the phone number), and click “Save”.
  10. Click the Sync button again and notice that the change you just made is picked up by the synchronization process.
  11. On the Contacts tab, you can grab an org chart item with the mouse and move it around.
  12. To open the details view for a contact, either double-click an org chart item or click “Show Grid” and double-click a contact in the datagrid.
  13. On the Market History tab, you can grab the chart with the mouse and move it left and right, adjust the time selection using the dividers in the bottom chart, etc.
  14. Continue to add and modify accounts and contacts, and click the Sync button to see the changes being picked up by the synchronization process.

Native drag-and-drop

  1. Click “Dashboard” in the menu.
  2. Drag any of the three charts and drop it on the desktop: the chart is saved as a JPG on the desktop.
  3. Open a Word document, drag a chart from the application again, and, this time, drop it directly in the Word document.
  4. Click the grid view icon for any of the three charts.
  5. Select some rows in the datagrid, and, without releasing the mouse button, drag the selected rows and drop them on the desktop. The rows are saved as an Excel document on the desktop.
  6. Double-click the Excel document to open the spreadsheet.
  7. Drag some rows from the Datagrid again, and, this time, drop them directly somewhere in the Excel spreadsheet.

Source Code and Disclaimer

Click here to download the source code of the application.

This sample is a proof of concept and not a full featured application. Some modules of the application (like opportunities and activities) are not implemented in this version.

Credits to Mark Shepherd for the Springgraph component used for the org chart.

48 Responses to SalesBuilder on AIR: Local Database, Data Sync, and Native Drag-and-Drop

  1. Edouard Janssens June 15, 2007 at 2:56 am #

    Excellent work !

    Is there a way the do the opposite Drag and Drop ?
    For example dragging a jpeg from the desktop to a list in an Air application ? Or a text snippet to a text area ? Or a url bookmark to a datagrid or bookmarks, etc..;

    Tx.

  2. Russ June 15, 2007 at 12:01 pm #

    I can’t seem to get the app to install, I get this error when I try
    This application could not be installed or launched (AIR file C:\DOCUME~1\Russ\LOCALS~1\Temp\salesbuilder-2.air is invalid: The digest for salesbuilder-profile.swf is broken).

    I just updated the run time to the AIR version

    • budweiser careers January 5, 2014 at 5:51 am #

      Hi would you mind sharing which blog platform you’re using?

      I’m planning to start my own blog in the near future but
      I’m having a tough time selecting between
      BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is
      because your design seems different then most blogs and I’m looking for something completely unique.
      P.S Sorry for getting off-topic but I had to ask!

  3. christophe June 15, 2007 at 12:22 pm #

    Russ,
    I tried the install on a few machines and don’t see that problem. What’s your configuration? Did you have a pre-beta version of Apollo/AIR installed? Did you uninstall it before installing the beta?
    Christophe

  4. gianfranco June 15, 2007 at 1:01 pm #

    I get this error :

    This application could not be installed or launched (AIR file C:\DOCUME~1\torgia00\IMPOST~1\Temp\salesbuilder-2.air is invalid: Unrecognized version namespace “http://ns.adobe.com/air/application/1.0.M4″.).

  5. christophe June 16, 2007 at 6:14 am #

    Gianfranco,
    Can you confirm that you followed the instructions on the AIR install page? Specifically that you uninstalled any pre-beta version of Apollo/AIR before installing the beta.
    “If you are having trouble installing an AIR application and you previously installed the Apollo alpha, the Apollo alpha must be uninstalled before installing the Adobe AIR beta. Instructions for uninstalling the alpha on Mac and Windows are provided in the release notes.”
    Christophe

  6. Jhecht June 16, 2007 at 5:20 pm #

    I just installed the Apollo beta right over the alpha… Every app i’ve tried works fine for me.

  7. hxnozgsmun June 21, 2007 at 10:29 pm #

    Hello! Good Site! Thanks you! tjchdhxkzw

  8. BlueOceanCruiser July 3, 2007 at 9:05 am #

    Christophe, thanks for the wonderful example! There’s a lot of great stuff here that I want to learn how to add to my own projects. Are you planning to post any discussions on how you implemented some of these techniques. It’s a complex app and a little hard to follow (for a less skilled programmer like me) without some guidance/discussion. Anyway, thanks again for your efforts!

  9. GoGolfer July 12, 2007 at 8:32 am #

    Hello Everyone,

    I am a golfer myself and I like to play whenever I get a chance.
    A short while ago, a very good friend of mine told me about a great golfing equipment and accessories website that has discounted prices on all their products, same day shipping in most cases and there is no state sales tax, they are paying that.
    So if any golfer here is ready to save some money on quality products at highly discounted prices, you might want to check out their site at; http://hoffmangolf.com

  10. Bo July 24, 2007 at 6:27 am #

    Hi,

    Great article and can’t wait to get starting ‘deconstructing’ the application :) But – am I missing something here, or what does golf have to do with anything on this page?

  11. Danko August 6, 2007 at 7:59 am #

    Great windowing!!

  12. BruceH August 16, 2007 at 2:48 pm #

    I work in CRM and this is the beginning of a very good application. The line blurring standard Web apps and Client/Server is on the way out. The ability to have your users have this app locally and sync data has been around but the drag and drop feature to bring their data so easily to their desktop is very powerful.

    If you continue improving this app, one thing I would suggest is make sure your Air. App Has e-mail capability. Sales People must have E-mail.

  13. Cloth September 21, 2007 at 3:32 pm #

    Hello to all, its my new pages about cloth
    cloth diaper
    You can buy here 24\7.

  14. Pens September 27, 2007 at 3:37 am #

    Hello, here you can read all info about pen pal
    24\7.

  15. pens September 29, 2007 at 1:02 am #

    Hello nice blog! !!
    pen
    It’s my new page.about pens.

  16. shoes October 2, 2007 at 5:08 am #

    Hello nice blog! !!
    pen
    It’s my new page.about shoes.

  17. cod3master November 15, 2007 at 9:49 am #

    Very nice thing.

    I miss the AIR Version. You told that as soon AIR is released you will post it.

    I’m really interested how this works, since I also try to create a online / offline sync with AIR/Gears, but don’t see how AIR can interact with Gears, AIR has it’s own sqlite db.

  18. mahi February 15, 2008 at 11:00 pm #

    please any body help me….how to search the data from the data base..i need some source code.using hibernate,spring and velocity

  19. akorcu.net February 18, 2008 at 1:57 pm #

    thanks. nice jop

  20. ламинат August 24, 2008 at 11:00 pm #

    9iGood idea.4a I compleatly disagree with last post . nbi
    купить ламинат 2w

  21. Jitendra October 13, 2008 at 12:20 pm #

    I got this error while installing the application :

    This application requires a version of adobe AIR which is no longer supported. Please contact application author for an updated version.

    give me some solution…

  22. BabanQurban July 21, 2009 at 10:00 pm #

    Вот это да… После прочтения даже мне тема стала интересна.

  23. Bani Online April 29, 2010 at 1:23 pm #

    Excellent work !

    Is there a way the do the opposite Drag and Drop ?

  24. samsung battery June 21, 2010 at 7:59 pm #

    please any body help me….how to search the data from the data base..i need some source code.using hibernate,spring and velocity

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

    This application could not be installed or launched (AIR file C:\DOCUME~1\torgia00\IMPOST~1\Temp\salesbuilder-2.air is invalid: Unrecognized version namespace “http://ns.adobe.com/air/application/1.0.M4″.).

  26. golf swing slice August 12, 2010 at 9:34 am #

    I too get that same error message, any help appreciated

  27. kablo tv October 9, 2010 at 1:13 pm #

    thanks you

  28. Ethel October 18, 2013 at 4:38 am #

    Hello there! I know this is kind of off topic but
    I was wondering which blog platform are you using for
    this website? I’m getting tired of WordPress because I’ve had problems with hackers and I’m
    looking at alternatives for another platform. I would be great if you
    could point me in the direction of a good platform.

  29. dog January 8, 2014 at 11:45 am #

    Do you mind if I quote a couple of your posts as long as I provide credit and
    sources back to your site? My blog is in the very same niche as
    yours and my users would genuinely benefit from a lot of the
    information you provide here. Please let me know if this ok with you.
    Cheers!

  30. Quero ficar rico April 13, 2014 at 11:49 pm #

    you are in reality a good webmaster. The website loading pace is amazing.
    It kind of feels that you are doing any unique trick.
    Furthermore, The contents are masterpiece.

    you’ve performed a fantastic activity on
    this topic!

  31. Referencement Lausanne April 15, 2014 at 4:16 am #

    Good answers in return of this query with firm arguments and
    explaining all about that.

  32. film indonesia full April 15, 2014 at 5:12 pm #

    certainly like your website however you need to check the spelling
    on several of your posts. A number of them are rife with spelling problems and I
    to find it very bothersome to inform the reality on the other hand I
    will definitely come back again.

  33. شركة تنظيف بالرياض April 17, 2014 at 9:03 pm #

    Hello there! Thiss is kind of off topic but I need some advice from an established blog.
    Is it hard too set up your own blog? I’m nnot very techincal butt I can figure things out pretty quick.

    I’m thinking about stting up my own but I’m not sure where to
    start. Do you haave aany tips or suggestions? Many thanks

  34. Read extra April 28, 2014 at 6:57 am #

    lictors  lidding  lidless  liefest  liernes  lievest  lifeful  lifeway.
    It is said that one nasty green creature iss responsible for their existence.
    relievos relights religion relining relinked reliques relished relishes.

  35. شركة نقل اثاث May 8, 2014 at 7:53 am #

    شركة مكافحة حشرات بالرياض
    شركة نقل اثاث بالرياض
    شركة تنظيف فلل بالرياض
    شركة رش مبيدات بالرياض
    شركة تنظيف خزانات بالرياض

    شركة تنظيف منازل بالرياض
    شركة تنظيف شقق بالرياض
    شركة نظافة فلل بالرياض
    شركة مكافحة النمل الابيض بالرياض
    شركة مكافحة الصراصير بالرياض
    شركة مكافحة الفئران بالرياض
    شركة مكافحة بق الفراش بالرياض
    شركة صيانة مسابح بالرياض
    شركة مكافحة حشرات بالرياض
    شركة نقل اثاث بالرياض
    شركة تنظيف فلل بالرياض
    شركة رش مبيدات بالرياض
    شركة تنظيف خزانات بالرياض

    شركة تنظيف منازل بالرياض
    شركة تنظيف شقق بالرياض
    شركة نظافة فلل بالرياض
    شركة مكافحة النمل الابيض بالرياض
    شركة مكافحة الصراصير بالرياض
    شركة مكافحة الفئران بالرياض
    شركة مكافحة بق الفراش بالرياض
    شركة مكافحة حشرات بالرياض
    شركة نقل اثاث بالرياض
    شركة تنظيف فلل بالرياض
    شركة رش مبيدات بالرياض
    شركة تنظيف خزانات بالرياض
    شركة تنظيف منازل بالرياض
    شركة تنظيف شقق بالرياض
    شركة نظافة فلل بالرياض
    شركة تنظيف بالرياض
    شركة مكافحة النمل الابيض بالرياض
    شركة مكافحة الصراصير بالرياض
    شركة مكافحة الفئران بالرياض
    شركة مكافحة بق الفراش بالرياض
    شركة مكافحة حشرات بالرياض
    شركة نقل اثاث بالرياض
    شركة تنظيف فلل بالرياض
    شركة رش مبيدات بالرياض
    شركة تنظيف خزانات بالرياض
    شركة تنظيف منازل بالرياض
    شركة تنظيف شقق بالرياض
    شركة نظافة فلل بالرياض
    شركة مكافحة النمل الابيض بالرياض
    شركة مكافحة الصراصير بالرياض
    شركة مكافحة الفئران بالرياض
    شركة مكافحة بق الفراش بالرياض
    شركة صيانة مسابح بالرياض
    شركة تنظيف بالرياض
    شركة نقل عفش بالرياض
    شركة مكافحة حشرات بالرياض
    شركة نقل اثاث بالرياض
    شركة تنظيف فلل بالرياض
    شركة رش مبيدات بالرياض
    شركة تنظيف خزانات بالرياض
    شركة تنظيف منازل بالرياض
    شركة تنظيف شقق بالرياض
    شركة تنظيف فلل بالرياض
    شركة مكافحة النمل الابيض بالرياض
    شركة مكافحة الصراصير بالرياض
    شركة مكافحة الفئران بالرياض
    شركة مكافحة بق الفراش بالرياض
    شركة صيانة مسابح بالرياض
    شركة تنظيف موكيت بالرياض
    شركة نقل عفش بالرياض

  36. http://nobodysbusiness.ca/ May 13, 2014 at 2:19 am #

    I truly love your site.. Pleasant colors & theme.
    Did you develop this website yourself? Please reply back as I’m looking to create my own blog
    and would love to know where you got this from or
    what the theme is called. Cheers!

  37. It is not my first time to pay a quick visit this website, i am
    browsing this web site dailly and obtain pleasant data from here all
    the time.

  38. simple wooden box plans May 31, 2014 at 7:31 am #

    Kathryn was a finalist in the Gather-Borders-Mitch Albom contest:
    “Times My Mom Stood Up for Me:” My Mom Stood Up
    for Me During the Last Days of My Childhood. When this happens, you will be restricted to the
    price that the home builders will give you.

    You can use kitty litter, sand, or sawdust to collect the droppings.

  39. free bookshelf plans June 3, 2014 at 12:51 pm #

    In the winter, the dog’s body heat is what helps to heat the house.
    Not to mention, their evening aerobatic sessions are a whole lot of fun to watch.

    You can use kitty litter, sand, or sawdust to collect the droppings.

  40. free desk plans June 5, 2014 at 3:01 am #

    Rule #3 ‘ Talk about the one subject that is most interesting and important to
    your date. By taking advantage of the latest computer
    technology this product has compiled enough projects to fill many bookshelves.
    You can use kitty litter, sand, or sawdust
    to collect the droppings.

  41. small diy wood projects June 12, 2014 at 12:47 pm #

    In the winter, the dog’s body heat is what helps to heat the house.
    Know what drives him crazy (in a good way) and use that to your advantage.
    The key is to find the balance and that is when having
    an “attitude of gratitude” plays a key role.

  42. a June 21, 2014 at 5:22 am #

    My brother suggested I would possibly like this website. He used to
    be totally right. This post actually made my day.
    You cann’t imagine simply how so much time I had
    spent for this information! Thanks!

  43. klima servisi August 23, 2014 at 6:01 pm #

    Güzel çalışma ellerinize sağlık Sagılarımla

Trackbacks/Pingbacks

  1. Christophe Coenraets » AIR-to-Desktop Drag-and-Drop: Two Simple Utility Classes - June 15, 2007

    […] I have been using this feature in the SalesBuilder application I posted yesterday. In the process of building SalesBuilder I created two utility classes to abstract the details of generating bitmaps, XLS files, etc… […]

  2. links for 2007-06-27 « thebadtiming - June 27, 2007

    […] Christophe Coenraets » SalesBuilder on AIR: Local Database, Data Sync, and Native Drag-and-Drop (tags: flex apollo air adobe flash) […]

  3. Drag and Drop in AIR | Adobe AIR Tutorials - August 24, 2007

    […] more @ http://coenraets.org/blog/2007/06/salesbuilder-on-air-local-database-data-sync-and-native-drag-and-drop […]

  4. 12 Very Useful Applications Based on Flex/Flash - Ntt.cc - December 15, 2009

    […] SalesBuilder on AIR: Local Database, Data Sync, and Native Drag and Drop […]

Leave a Reply

css.php