As mentioned above (if you're reading this thread via the Goo Groups
site), I made several attempts at async without first planning them
through very well. All of these had to be scrapped because anything
beyond a JazzRecord.depth of 0, you have to load associated records.
You have to keep track of which associations have already been loaded,
only load to a certain depth, etc. All of these things need a concrete
tracking device, a stack or queue of some kind that will be passed
from one async call to the next, in addition to tracking the deeply-
nested object you're building that represents the base record and all
associated pre-loaded records. On top of association loading, you have
to deal with validations, some of which incur additional hits to the
database. Any db hit requires another async call, and it's just a
mess.
For the time being in my own webOS project, I'm using a simple wrapper
of the HTML5 db called Syncopate, also linked above. I'll be adding
some documentation for this shortly, but as you can see it's just a
means for calling HTML5 methods more conveniently.
Next step is to take something like Syncopate - which adds one level
of abstraction - and merge it with the ORM functionality of
JazzRecord.
Another issue not yet addressed is that automated testing of
JazzRecord currently doesn't even account for all the environments it
runs in. I've just done manual testing in AIR/Titanium, but would like
to add automated tests at some point soon. Testing anything that
depends on async is going to be a REAL pain.
Thanks for the interest in JazzRecord, Mike. I'd definitely love to
have it working across async environments (AIR also provides async db
API in addition to the synchronous one) but it's a much longer trip
than I'd initially packed for!