1 Reply Latest reply on Jun 18, 2010 3:09 AM by MikisMM

    App Architecture Question

    duder2

      I'm wondering if there's something wrong with my app architecture.

       

      The app's main file has 3 states which activate a different components (more like views).

       

      <s:states>

           <s:State name="view1" />

           <s:State name="view2" />

           <s:State name="view3" />

      </s:states>

       

      <comp:View1 includeIn="view1" />

      <comp:View2 includeIn="view2" />

      <comp:View3 includeIn="view3" />

      The components/views actually share parts.

      View1 = Part1, Part2, Part3,

      View2 = Part1, Part4, Part5

      View3 = Part2, Part3, Part5

       

      View1 component:

       

      <comp:Part1 />

      <comp:Part2 />

      <comp:Part3 />

       

      View2 component:

       

      <comp:Part1 />

      <comp:Part4 />

      <comp:Part5 />

      View3 component:

      <comp:Part2 />

      <comp:Part3 />

      <comp:Part5 />

       

      What I'm noticing is that a common component (e.g. Part1) re-initializes when I switch between views (e.g. View1 and View2). Is this normal? This means that if Part1 had values when it was in View1, all those values are lost when the app switches to View2 and vice versa.

       

      Any comments someone can give on what I'm doing?