Hi Tom.

I am in exactly the same situation as yourself. I am farely new to flex 
and have now found myself at a stage where I want to begin developing 
larger apps that can scale. From the reading I have done around the 
topic and from what I have heard others saying then Pure MVC is a good 
option to take. My understanding is that Cairgorm is very flex specific 
where as Pure MVC is not ( please correct me if im wrong ) it woudl 
sound sensible to then go for the Cairgorm option. However I believe 
Cairgrom is much more difficult to get your head around so decided not 
to try and go straight for Pure MVC.

Just another option for ya.

Hope that helps.

Barry.



Jules Suggate wrote:
>
> Hi Tom,
>
> You've hit on one of the classic "anti-patterns" of Flex programming:
> Application.application.blah type stuff.
>
> While this is regrettably somewhat 'normal', that doesn't mean it's ok
> :) As you probably have guessed, it leads to code that is really hard
> to change later on as it is all tangled up with itself.
>
> The solution is to use one of the application patterns that have been
> studied by the GUI programming community in general (not just Flex
> programmers) ... such as MVC (Model-View-Controller).
>
> Martin Fowler is one of the canonical sources on this stuff:
> http://martinfowler.com/eaaDev/uiArchs.html 
> <http://martinfowler.com/eaaDev/uiArchs.html>
>
> Mate, Parsley or Cairngorm are open-source Flex frameworks that
> implement the shell of one or more GUI patterns to save us all
> re-inventing the wheel. Realistically, most people learn the patterns
> by using one of these frameworks or their cousins (there are more, I'm
> just giving a few that are currently flavour of the month).
>
> Cairngorm has been getting a bad rap lately due to testability of the
> resulting application (or lack thereof), but it's deeply embedded in
> the Flash community (for better or worse).
>
> Martin Fowler et al will give you an academic understanding, introduce
> you to some code (Martin Fowler uses C# WinForms), explain the finer
> points and describe several variations that you may or may not find
> interesting.
>
> You've bitten off quite a large topic with that innocuous question ;-)
>
> Jules
>
> On Tue, Dec 2, 2008 at 23:56, tom s <[email protected] 
> <mailto:tcs2201%40gmail.com>> wrote:
> > Hi,
> >
> > I'm writing my first flex app.
> > So far it all works, but I'm getting to the point where I need to start
> > structuring it, for ease of further development.
> > Right now I simply have many functions defined within the <script> tag
> > within the <application>.
> > I'm now thinking through my options for structuring this better. I'm not
> > asking for *specific* structuring recomendations, as I know that 
> would be
> > imposisble w/o you knowing the specifics of what I'm doing.
> >
> > What I'm looking for is a good place to read about the different 
> options, so
> > I can learn about them.
> > Preferable free online, or in Safari Books Online.
> >
> > To be clear: when I say structural options I mean things like:
> > a) having all the code in the <script>
> > b) putting the code in a seperate .as and point <script source=""> 
> at it (I
> > know this is very similar to (a) )
> > c) using static methods in a 'static' class
> > d) creating classes to fully OOize the code
> > e) something else I dont yet know about...
> >
> > I'm reading 'Advanced Action Script 3 with Design Patterns', which I 
> hope
> > will help, but I would like to have some flex specific knowledge 
> also, so
> > that I can see examples of how to allow objects outside the 
> <application> to
> > access those defined by mxml within the application (like buttons). I'm
> > concerned that will end up with a lot of Application.application.foo 
> type
> > code - is that 'normal'?
> >
> > I'm hoping this makes enough sense...
> >
> > thanks
> >
> > tom
> >
> >
>
>  


Reply via email to