3 Replies Latest reply on Jun 24, 2008 7:52 PM by bitwyse

    States, Modules or What???

    Idriel
      Well. I wanna create Web app with let say few forms.

      Firt Authentification, Second Displaying Panel with lot's of fetures (if not logged session... then return to Authetification), then with Administer option...
      Need lot's of AS population.

      So If I use states that really khm not good, becuse lot's of code, it's hard to code.
      If I use modules than I have problems not show in center, then it's show behind authen panel...

      So what is best way to work with flex and to have something like Windows frames.

      I wanna make the whole page in flex (some scripts works PHP. but only for returning true, flase...), but I wanna make it into different modules/states or whatever only it have the princip like Windows Forms.

      Thanks.

        • 1. Re: States, Modules or What???
          peterent2 Adobe Employee
          You can do it all, if you like. Just remember that Modules have to be downloaded on demand, so the first time there will be a delay. Use Modules only if some people will use some of the features. For example, if 90% of the user will never use the Admin portion, then having that as a Module makes sense since they shouldn't wait for it to download as part of the main SWF.

          To use states, code the parts (login, panel, admin) as separate Flex classes. Then the main app, with the states, will be easier to code and understand.

          Using states to make the login disappear and the panel/admin appear is nice way to handle it.
          • 2. Re: States, Modules or What???
            *gsb* Level 1
            I too have been playing with modular designs.

            Currently, in my main application, all states are 'popup' modules.
            In your case, this may work well for the login / registration as well as for the preference settings and the like.
            • 3. States, Modules or What???
              bitwyse Level 1
              Personally, I have not tried modules. Although I think I may have too soon as my application is becoming quite large. I find states a bit cumbersome. What I am using now is a view stack and it works quite well. This is an excerpt from my Main mxml file . . .

              The beauty of this is I can set the workflow state anywhere in my code by accessing the model and that page shows up while all other pages are hidden.

              hth
              STeveR