This is also something I’ll have to take a look at later.
Computed properties and binding « FLEXYGEN
Updating views in response to model changes is a snap with Flex data binding.
A model property is set to be [Bindable] and and a view property is set to an expression in curly braces that refers to that property. &lt;snip&gt;
Flex implements this by dispatching a PropertyChangedEvent when “description” changes, but by implementing implicit getter and setter functions, one can customize the event. In the MVC sample I wrote, which I hope to post one of these days, I stumbled upon the following idiom, where several bindable properties are based on a single value changing.
Cairngorm helps when you’re wanting to know how to structure things. There are other options, especially as you start actually understanding the language. PureMVC is an alternate framework. Then Flexygen has a simple MVC sample… without using Cairngorm. It’s not that Cairngorm is bad! It’s the de facto standard framework for Flex (right now at least). But sometimes it feels like you’re fighting it a bit… at least for those who are still learning like me. These are just some things to keep in mind.
Up next is Practical Patterns in Flex which also offers another possibility. I’ll have to look at it in more detail to understand it more though… I’ll save that for another day!
joeberkovitz.com » MAX 2007 in Barcelona: Talk Materials Online
A presentation called Practical Patterns in Flex, which I adapted from Jim Echmalian’s
talk at 360Flex earlier this year. This features a brand new take on
the Model-View-Controller-Service architecture, and highlights the use
of specific design patterns to remedy problems of encapsulating
responsibility, dealing with asynchronous operations, and gaining
access to the “right” controller without using messy singletons. I put
together a working sample application in source code form that accompanies the talk.