Hello,

after some weeks spent playing with Flex, I'm now trying to learn
Cairngorm. I understood the concepts of the framework (and I know the
problems it intends to address), but I've some questions about the
best usage of Model Locator with data binding.

To build up the user interface of the classic employees management
sample, I started dividing it into logical pieces, for example
EmployeesFilter, EmployeesList and EmployeeDetail. Now, I'm about to
write a "layout-only" interface that use them (it may be the
application itself, or another component for more complex apps).

Now, my question is: should the single UI pieces be aware of the model
locator, or it is better for them to expose properties, letting the
layout component to use the model locator?

In first approach, we lose a bit of flexibility (says that I want to
be able to pop up the detail of two different employees at the same
time), while with the second one I don't have to code lots of
error-proof bindings when composing the main interface out of my views.

Coming from struts, I don't feel confortable with views that "pull"
data, I'd prefer having something (the controller) to retrieve the
data from the appropriate source and to make it available to the view.
This is closer to the secondo approach that I've described, but it
seems not to be the "cairngorm-way" to me:)

Cairngorm-enabled flexcoders out there, which approach are you
chosing? Any thought welcome.

Thanks
Cosma

Reply via email to