Decoupling Presentation from Domain - How's that?
Hi there,
Beeing interested in flex frameworks, i just made my way through the cairngorm 3 guidlines and diving into parsley - and i love what i see sofar.
Nevertheless one big question came up for me, regarding the decoupling of presentation and domain through injected presentation models as explained within the guidelines and used within both cairngorm's and parsley's tutorials:
Say i want to design a custom mxml component for presenting some data collection (maybe a datagrid component with some visual extras). Now i would want to reuse this component for representing several types of data collection, maybe with different sources and needs for data processing. If i understand the pm pattern correctly i would implement different presentation models (maybe against an interface).
At this point i'm confused how to reuse my mxml component: i have to inject one presentation model into it but how can i than use the same component with another pm injected?
I thought of inherit the mxml component but i think that wouldn't work in a nice way because the component interns are coupled with the injected pm via bindings. I suppose thats just a misunderstanding of the pattern so, can somebody give me a hint?
Thanks in advance...jdee
