Re: [flexcoders] ViewStates vs ViewStacks in App Control

2007-01-04 Thread Paul Andrews
- Original Message - 
From: "Kevin Newman" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, January 02, 2007 7:41 PM
Subject: Re: [flexcoders] ViewStates vs ViewStacks in App Control


> Paul Andrews wrote:
> >> 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.
> Components will be instantiated on demand, but is there a way to prevent
> them from even downloading, until they are needed?

No, but flash is a streaming format. If you look back on previous flecoders
discussions, there was a similar question in this thread:
"Lazy loading components"

Paul

> Kevin N.
> --
> 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
>
>
>
>




Re: [flexcoders] ViewStates vs ViewStacks in App Control

2007-01-02 Thread Kevin Newman
Paul Andrews wrote:
>> 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.
Components will be instantiated on demand, but is there a way to prevent 
them from even downloading, until they are needed?

Kevin N.



Re: [flexcoders] ViewStates vs ViewStacks in App Control

2007-01-01 Thread Paul Andrews

- Original Message - 
From: "Kevin Merritt" <[EMAIL PROTECTED]>
To: 
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
>
>
>
>