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: multi-page form wizard  (Read 5280 times)
sarbx
Courseware Beta
Newbie
***
Posts: 1


View Profile Email
« on: July 30, 2007, 09:24:58 »

Can some one guide me on developing a multi-page form wizard using puremvc in Flex,

I'm kind stuck on making the following decisions,

- using a single model for all pages or one model per page
- using view-states or view-stack for the pages

Any pointers or samples will be useful,

Thank you.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: July 31, 2007, 12:59:15 »

Sarvanan,

To the View States or ViewStack question, I would suggest the latter. You could dynamically create and add the children (wizard pages) based upon some configuration. Of course it could be done with view states, but they'd all need to be defined in MXML ahead of time.

In PureMVC, the Model is merely a Singleton that caches Proxies. so your question is more likely 'one Proxy or many'? That will depend on how generic or specific your case is. Being something of an Architecture Astronaut (a derogatory term in some circles, yes), I have a tendency to push things toward the former end of the gradient.

If the wizard collects wildly varying data types from many sources dynamically at runtime, then more than likely the answer is many.

If the wizard collects master/detail type data, (imagine a resume wizard, stepping through the sections, sometimes allowing you to loop,  over adding employers for instance) then the answer is probably still several.

In the resume example, you might have a ResumeProxy that contains the master info, then an Employer proxy that contains a single job history entry, perhaps a ReferencesProxy that collects all your references.

The ResumeProxy would have the ability to communicate with the remote service and save the resume, gathering up the data from the other Proxies as needed in the process.

If the wizard is very simple, like an installation wizard that needs to collect a few things like where to install, what parts not to install, whether to add a desktop icon, etc; then its possible view states and a single Proxy would work perfectly fine.

Hope this helps,
-=Cliff>
Logged
Pages: [1]
Print