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.

  • Edouard Janssens

    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.

  • Pingback: Christophe Coenraets » AIR-to-Desktop Drag-and-Drop: Two Simple Utility Classes()

  • Russ

    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

    • 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!

  • christophe

    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

  • 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”.).

  • christophe

    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

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

  • Hello! Good Site! Thanks you! tjchdhxkzw

  • Pingback: links for 2007-06-27 « thebadtiming()

  • BlueOceanCruiser

    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!

  • 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

  • Bo

    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?

  • Great windowing!!

  • BruceH

    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.

  • Pingback: Drag and Drop in AIR | Adobe AIR Tutorials()

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

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

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

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

  • cod3master

    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.

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

  • thanks. nice jop

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

  • Jitendra

    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…

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

  • Pingback: 12 Very Useful Applications Based on Flex/Flash - Ntt.cc()

  • Excellent work !

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

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

  • 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″.).

  • I too get that same error message, any help appreciated

  • thanks you

  • 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.

  • dog

    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!

  • 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!

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

  • 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.

  • 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

  • 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.

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

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

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

  • 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!

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • a

    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!

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

  • thnx

  • obrg amigos

  • güzel birşeyler

  • mass production, cost-effectiveness and quality of production we.http://www.jonsunsport.com/spor-coraplari.html

css.php