----- Original Message ----- 
From: "Kevin Merritt" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Monday, January 01, 2007 7:27 PM
Subject: [flexcoders] ViewStates vs ViewStacks in App Control


> I am trying to build out a basic framework for my application and I
> have about 4 different "screens" that users can view depending on
> what they are trying to do in the applications:
>
> Welcome Graphics & Login Screen
> Overview Screen
> Detailed View Screen
> Generate Reports Screen
>
> These screens don't share similar menus or components so I am
> thinking it is best to create a view stack for navigating between the
> different screens ->
>
> Application
>       ViewStack
>            Welcome Graphics & Login Screen
>            Overview Screen
>            Detailed View Screen
>            Generate Reports Screen

Perhaps:

Application default state
            Welcome Graphics & Login Screen
Application logged on state
          ViewStack
                Overview Screen
                Detailed View Screen
                Generate Reports Screen

Apart from the obvious logon situation I think states can work really well
within components.

> Here are my questions:
> 1) If I do this, can I add a loader to each child of the ViewStack so
> that the user does not have to wait for the entire app to load in
> order to start the application?

This already happens with components instantiated on demand as you run
through the view stack.

> 2) I could also do this using ViewStates, but it seems to me that
> ViewStates are more useful when there are significant shared assets &
> components between the different states.  However, performance-wise
> would it be better to use one over the other?

I would split the different 'screens' into separate flex components and add
them into the viewstack. Having them as separate components makes the app
much more modular - my designs are components nested within components like
building bricks. Use events to communicate between components (or more
properly your MVC architecture).

> 3) In the long run (should my application grow larger)  would it be
> better to use a modular approach and load modules for each view?

See how it goes - build as much as you need - when/if it gets slow, look
again at re-architecting the application using components you have built.
Don't make things more complicated than it needs to be.

> However because I am using Cairngorm would this add an extra layer of
> difficulty trying to maintain/share a ModelLocator, FrontController,
> etc between a number of different modules?

Don't really see how Cairngorm would affect this. If you build in
complication it will be complicated with or without Cairngorm.

Paul


>
> Thanks for your advice.  It always seems the design decisions are
> much more confusing than the actual coding!!
>
> - Kevin
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>


Reply via email to