3 Replies Latest reply on Aug 14, 2009 9:18 PM by Gregory Lafrance

    viewstack vs states


      I've read in a couple places that's best to use a viewstack when doing a site in flex. What are the pros/cons of using a viewstack vs using states?




        • 1. Re: viewstack vs states
          FlexAppsStore.com Level 1



               Here's a good discussion around the subject.




               For us, it's always a design question. Do the screens interact or are the completely separate. If they are then states win, otherwise we use viewstacks.


               Also, you have to be careful when in a large app with your data assignments. Might want to check out "CreationPolicy" rules for performance as well.



          Kind regards,


          Ivan Alexander, PMP

          Flex Applications Engineer


          • 2. Re: viewstack vs states
            Ansury Level 3

            States suck, end of story.


            Just kidding, that's a good thread.  Yep the only thing I'd even consider states for is a small sized standalone component--but I rarely work on such things.  Not worth the trouble on a larger scale.  You can still do transition effects and everything without states.


            Also consider the fact that states are supposed to* change completely (how they are used and work) in Flex 4.  I'd at least stay away until I'm using SDK 4.


            *=I've yet to take a direct look myself

            • 3. Re: viewstack vs states
              Gregory Lafrance Level 6

              States should only be used for small components that change their UI in minor ways.


              ViewStack is the real workhorse in Flex for multi-screen apps.


              If this post answers your question or helps, please mark it as such.