In the project I’m working on, we’ve just started to use Flex 4. We don’t use any particular framework and management wants a full view/separation architecture. The basic principle is to associate each time an ActionScript class as a model to the .mxml view.
I’m having a hard time understanding how to link the two : who references who, and to what extent can I eliminate the script part in my view.
I’d really appreciate any insights on this one.
Thanks
You also have the ability to use the “Presentation Model” pattern, which is very similar to MVVM in the Silverlight world. The difference is that in Flex, it is VERY easy where Silverlight requires a ton more plumbing.
The architecture goes like this:
The View references the PM and uses data binding to properties in the PM. The PM Wraps the Model and adds UI-level validation, UI-level behavior and Formats data.
“Separated Presentation Patterns” like PM, MVC and MVP are really important for the following “ilities”: