public
Description: Mixing CouchDB, Sinatra, AIR and RestfulX to create an offline/online ready app with undo/redo capabilities.
Homepage:
Clone URL: git://github.com/dima/soup.git
drudru (author)
Tue May 26 21:45:28 -0700 2009
dima (committer)
Tue May 26 23:22:13 -0700 2009
commit  2c00eb2a78c2d41d3d3f907c126e0affe0eec98e
tree    af81a46eab88993533888477c2bcfe557ad00ec2
parent  ac9a85d1d89929870f72d04090e12edc2cee9918
soup /
name age message
file .actionScriptProperties Thu Mar 19 01:14:36 -0700 2009 Ran rx-gen . to upgrade the project to restfulx... [dima]
file .flexProperties Sat Jan 24 00:10:22 -0800 2009 Added RestfulX stuff. [Dima Berastau]
file .project Sat Jan 24 00:10:22 -0800 2009 Added RestfulX stuff. [Dima Berastau]
file README.rdoc Sat Jan 24 23:56:04 -0800 2009 Fixed a typo [Dima Berastau]
file Rakefile Sat Jan 24 00:10:22 -0800 2009 Added RestfulX stuff. [Dima Berastau]
directory app/ Sat Jan 24 23:03:25 -0800 2009 Modified PUT implementation to be more in-line ... [Dima Berastau]
directory bin-debug/ Thu Mar 19 01:14:36 -0700 2009 Ran rx-gen . to upgrade the project to restfulx... [dima]
directory config/ Thu Mar 19 01:14:36 -0700 2009 Ran rx-gen . to upgrade the project to restfulx... [dima]
directory db/ Sat Jan 24 00:10:22 -0800 2009 Added RestfulX stuff. [Dima Berastau]
directory lib/ Thu Mar 19 01:14:36 -0700 2009 Ran rx-gen . to upgrade the project to restfulx... [dima]
directory script/ Thu Mar 19 01:14:36 -0700 2009 Ran rx-gen . to upgrade the project to restfulx... [dima]
file soup.rb Tue May 26 23:22:13 -0700 2009 Updated models to use non-deprecated class and ... [drudru]
file soup.tmproj Thu Mar 19 01:14:36 -0700 2009 Ran rx-gen . to upgrade the project to restfulx... [dima]
README.rdoc

Soup: Mixing CouchDB, Sinatra, AIR and RestfulX to create an offline/online ready AIR app with undo/redo capabilities.

Description

This little AIR app is just a step above a basic rx-gen generated AIR application. It adds the ability to:

  • Go from online mode to offline mode and back. When you are in offline mode the application saves all the records to local AIR SQLite database.
  • Synchronize records when you are back online. When you go back online the application switches to AS3JSONHTTPServiceProvider and you can optionally synchronize all the data you modified/created/deleted while offline using Rx.changes.push().
  • Undo/redo. You can perform undo/redo on all creates/updates and deletes in both online and offline mode.

Running

To try this app out do the following:

  ruby soup.rb

This will start up your Sinatra server on localhost:4567

Next, go to localhost:5984/_utils (this is your CouchDB admin URL) and create a database called "sinatra".

Then start your Soup AIR client:

  rake air:run

Create some records, etc to try it out. To go into off-line mode simply stop the sinatra server. You can keep creating records after you go off-line. To go back online, start the server again. To synchronize push "Synchronize" button and check out your CouchDB server to make sure all the new stuff made it there.