Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Application package strucutre and ViewStack questions  (Read 6316 times)
ymwang2001
Newbie
*
Posts: 1


View Profile Email
« on: August 24, 2009, 01:08:23 »

I read the following discussion about Application package strucutre:

http://forums.puremvc.org/index.php?topic=8.0

I try to understand what is the best way to design my PureMVC application.

For example, when I first start my application, it displays a menu bar with menu items on top and the remaining area of the screen is used to display screen layout for different domains (e.g. domain1, domain2 .... domain10) based on what menuitem selection.

Could you help me with the following questions?

(1) Do you see any problem with the following Application package structrue ?

(2) Is standard PureMVC appropriate for this scenario?  or
     I should consider domain1, domain2 ... etc as separate modules and use Multi-core PureMVC instead ?

(3) Should I use ViewStack to navigate different screen layout based on what menu item is selected?
     What happens if I have 30+ menu items (or submenu items) that will trigger the change on screen
     layout?   Is ViewStack approriate to handle this ?

     In Main.xml, it references MainDisplay.mxml
     Inside MainDisplay.xml, it contains

             <mx:ViewStack>
               <components:viewForDomain1 creationComplete="..."/>
               <components:viewForDomain2 creationComplete="..."/>

               .........
   
               <components:viewForDomain10 creationComplete="..."/>
             </mx:ViewStack>


=================================================


com.myco.myapp.[domain1].model.*
com.myco.myapp.[domain1].view.*
com.myco.myapp.[domain1].controller.*

com.myco.myapp.[domain2].model.*
com.myco.myapp.[domain2].view.*
com.myco.myapp.[domain2].controller.*

com.myco.myapp.[domain3].model.*
com.myco.myapp.[domain3].view.*
com.myco.myapp.[domain3].controller.*

..........

com.myco.myapp.[domain10].model.*
com.myco.myapp.[domain10].view.*
com.myco.myapp.[domain10].controller.*



com.myco.myapp.main.controller
                    StartupCommand.as
                    ModelPrepCommand.as
                    ViewPrepCommand.as

com.myco.myapp.main.view
                    MainDisplayMediator.as

com.myco.myapp.main.view.components
                    MainDisplay.mxml

com.myco.myapp.main.model



com.myco.myapp
                    ApplicationFacade.as
com.myco.myapp
                    ApplicationConstants.as
 
Main.mxml


Thanks for your help

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 26, 2009, 12:54:58 »

This does sound like a Multicore project.

And a ViewStack will be fine. The default behavior of deferred instantiation means even if you have a hundred children of the stack, it only instantiates the first one shown, and thereafter only as you navigate to them.

Here's some packaging advice for MultiCore:
http://forums.puremvc.org/index.php?topic=1308.msg6048#msg6048

-=Cliff>
Logged
Pages: [1]
Print