Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: saving and reloading application state  (Read 7161 times)
inconduit
Newbie
*
Posts: 9


View Profile Email
« on: February 24, 2009, 08:29:55 »

i'm using the Undo utility with PureMVC and it seems like i can use the Command stack in the CommandHistoryProxy to implement persistent application state.

i'm building a media viewing/editing application, it will be heavy on UI components.  lots of windows and buttons and options.  i would like to take a snapshot of the overall application state, store it, and use it to replicate that state at a later time.  (stored to a database most likely).

what i'm thinking so far is that to take that snapshot, i can simply look at the Command stack, and serialize each individual command out to a database, and later read them in, in order, reconstruct them and execute them to rebuild the application state.

am i taking the right approach? it seems i would have to write a serialize/deserialize function for each Command, or perhaps use a CommandFactory that builds these Command instances.

i'm just wondering if i'm on the right track here, or if there's some other part of PureMVC that i should be looking at.

thanks for your time
adam
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: February 24, 2009, 07:09:33 »

You may want to have a look at the State Machine utility.

-=Cliff>
Logged
Pages: [1]
Print