The absolute best thing you can do right now is read this article. 
http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html  

The Cairngorm framework is a great option for flex projects big and 
small, This 6 part series will help you understand how it all ties 
together.  I had never used Flex before I read this series of 
articles, and in 2 days and I was off and running with total 
confidence.

-Geoff

--- In [email protected], "Erik Price" <[EMAIL PROTECTED]> wrote:
>
> On 4/25/07, Ian Skinner <[EMAIL PROTECTED]> wrote:
> 
> > So, one has managed to wade through all that exposition, what is 
a good
> > way to do this?  Where do I put the data access logic.  I presume 
in my
> 
> You might want to read up on MVC:
> <http://en.wikipedia.org/wiki/Model_view_controller>
> 
> > root application file.  But, if I do that, how do I access it 
from my
> > various view pieces?  How do I connect all the dots?
> 
> Your view pieces ("components") shouldn't call your data access 
logic.
>  Instead, they should fire (possibly custom) events when the user
> "does something".  In your Main.mxml, or better yet in 
a "controller"
> layer of ActionScript classes (see MVC, above), you will write code 
to
> listen for these events and call the data access logic code, which
> itself probably belongs in yet another separate layer of 
ActionScript
> classes.
> 
> This process of factoring out your application into layers is called
> architecture, and there's an infinite number of ways to do it.  When
> people recognize a general pattern for doing this, they usually will
> construct a framework to facilitate re-use and avoid repetition.  
The
> Cairngorm framework is an example of this.
> 
> e
>


Reply via email to