5 Replies Latest reply on Oct 29, 2009 10:09 AM by mbskels

    Application Architecture (newbie)

    mbskels

      Trying to move to Flex and as part of the learning process I am converting a very simple app I coded some time ago into Flex.

      I am struggling to understand the "correct" approach to structuring the modules within the application.

       

      The original app had an opening screen that was split into six defined areas (large buttons) that formed the opening menu. Each button loaded a sub-module of the app. Three of the sub-modules were very simple and used the screen area of the "button" to run the module. The other three modules were more complex and for them a new screen was loaded to run the module. Exiting these sub-modules returned to the opening screen with appropriate clean up before closing the sub-module.

       

      I can see that the three simple modules could be coded in Flex as three separate states with appropriate transtions between the opening state (main menu) and each module. I am struggling to understand the best approach for the three more complex modules that each require a completely new screen layout. Although they could also be coded as different states surely that is not a good approach and not scaleable to more complex apps?

      Alternatively I believe each sub-module could be a separate swf loaded by the main app but again not sure that is a good structure?

       

      Are there other, better options to maintain a clean structure and particularly to ensure appropriate clean-up when a sub-module is closed?

       

      When I search for some tutorials on this design issue I keep getting sucked into discussions of Cairngorm or similar which is way too complex for my app.

       

      Grateful for some advice on how to structure a simple app like that described or if someone could point me to a tutorial on that subject.