I've recently started toying around with Adobe Air and I am looking at things from an HTML/JavaScript perspective as I have no experience in the Flex/Flash realm (though I've started poking around there as well).
As I've started to think about the design of an application in Air using only HTML/JavaScript I began to wonder what approach people are using to maintain application state. From my limited experience, I can see two obvious ways:
The initial page that loads will contain the JavaScript objects for the state and an iframe to hold the real content pages which in turn will use "parent.state" style references to obtain or modify state.
The application makes use of the integrated SQLite database. I readily admit that I have no experience with this part of the Air framework yet, so I would be curious about any performance impact.
I can see an advantage to the first approach in that you can also have "global" JavaScript objects, for example an open socket connection used to communicate with a server throughout the application lifecycle and of course the second approach lets the application state be maintained between different runs of the application.
While I know that the best answer is probably "Depends on what your application does," I'm more interested in thoughts and opinions on the strengths or weaknesses of these approaches and having my eyes opened to the approaches I don't yet see.