Hi there, I'm working right now on the basement of the new version of the main flash app of my company. This is quiet evolve chat that we plan to deploy with Flex for next version.
So i'm deep in MVC+C questionning. I have deeply look at Cairngorm and PureMVC finding both interessting with qualities and defaults. Anyway, I don't think this a framework question but a code design question. My question is on where are the responsabilities when views needs to be updated because of model changes. I start with a little example : My model handle a list of conversations. Conversations are list of messages and one user. This user can be a contact or not. Conversation can be active or not (while you have not respond to a message of an user the conversation is not active) Some views need to know only the user with active conversations, other only user with non active conversations and other one only contact user. My concern is who needs to give the sorted by status list ? First I was thinking in was the model who just need a list for each case that be upate every time the main model list is updated. Counter argue is that in this case we implement view logic in model (the need to have specific information on the main list is specific to views). With this first possibility I can use data binding from model to view. (Cairngorm's spirit) Or have a command that push the data updated in the view. But in this case, I think that the Command is too much tied to the View. Other possibility is that the Command sort the main data of the model to create the needed sorted list and push it to the view. Logic is in the command and model stay simple. But once more, Command is tied to the View. To end, the moslyt use technique is that Command only update Model and Model notify view of a change. Model can notify view with a simple onChange (or whatever) event, but the view have to get is only needed info from the model directly and maybe the updated data is not the one's handle by this view. So maybe the model could dispatch one event fo each property and the view only listen to needed upaded property (PureMVC's spirit for what I know). So i'm not sur of wich way is the better. I'm sure there are great experience to share here and discuss about. For me the Model > View communication is the hardest part to well design. Hope I can have some great advices here and also please don't come to a Cairngorm vs PureMVC battle :) -- BenoƮt Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net

