PDA

View Full Version : Flex and code structure


Boeing307
07-04-2008, 12:14 AM
Hi... I am brand new to Flex but I develop in Java, Ruby, Smalltalk etc.

I went to look for some good code samples to get started with Flex but most "getting started" type code shows mxml files with simple script tags placed in the mxml file to provide some functionality. I would like to start off by:
1) Developing domain classes in ActionScript
2) And then developing the UI (mxml) and cleanly seperating the UI from my model objects

Can someone point me to some good simple examples of how code is properly structured in Flex to do this.

thx... and looking forward to my Flex journey

Sleeve
07-04-2008, 07:59 PM
I have read that Java to AS3 is like British English to American English so I wouldn't bother with the basics to much. Instead, Have a look at PureMVC, particularly the multi-core version and read through the best practices paper (about 50 pages). That should get you off to a good start. By convention, Flex has some built in capabilities for MVC design patterns but the PureMVC framework almost guarantees close adhesion to the pattern.

Welcome and good luck!