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: Dynamic View Creation/Destruction  (Read 8230 times)
Elephant
Newbie
*
Posts: 9


View Profile Email
« on: April 15, 2008, 10:09:22 »

Hello,

I'm working on an app that uses a viewstack to manage multiple views.  Each view plays a background SWF (either static image or short video) and some audio.  Most of the views involve extensive interaction with the user.

With the number of views that get activated as we step through the app, we're consuming lots of memory.  To ameliorate that, we'd like to expire/unload views as the user finishes them, then reload them again when they're needed.  One thought we've had is to create all the views as separate SWFs that throw appropriate events and expose a simple API for setting any necessary data, then manage them from a Mediator.

We have a linear path through the application, so we can easily use a generational model for view components:

Parent:  Current view
Child:  Preloading resources for the next view

However, from what I've read, neither the viewstack nor view states really fit this type of model.  Does anyone have some thoughts on how this could be arranged to mesh easily with the PureMVC structure?
Logged
trilec
Sr. Member
****
Posts: 52



View Profile WWW Email
« Reply #1 on: April 17, 2008, 05:06:34 »

Elephant ,
if you are considering each SWF as a module within itself perhaps the multicore version may help in this situation.The stage may be considered the main core and each "View SWF module" additional cores.

If you are new to pureMVC this may appear a little daunting and it may help reviewing other posts on "Modularity" If you do decide to investigate this further

T
« Last Edit: April 17, 2008, 05:13:03 by trilec » Logged
Pages: [1]
Print