The view would have public methods the controller calls. The views retain their encapsulation/loose coupling as does the model. The controller however, is tied into calling specific methods on views - so it's tightly coupled. There are patterns to break this down further (i.e. Cairngorm uses "Commands") - but I usually don't care if the controller has to call specific public methods on views. That's my take anyway, there are others that are far better at abstracting this than I am and certainly there are a million ways to skin a cat.
Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mattheis, Erik (MIN - WSW) Sent: Thursday, March 18, 2010 5:43 PM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening I've been thinking about the below message from Jason and tried rearranging a simple project into a MVC for a while this afternoon, but couldn't figure out how to do it without breaking encapsulation. I think I'm not getting the MVC advantage because I don't understand one of two things - or maybe something else: The controller listens to an event from the model, how does the controller inform the view to react without a) breaking encapsulation or b)dispatching another event the view is listening for. In b it would seem better to me to have the view listen to the model directly. I tried it both with the controller being the document class and not. Help? Is there a simple example someone can point me to? _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Merrill, Jason Sent: Thursday, March 18, 2010 9:51 AM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Well, that's OK and you don't even have to get fancy yet - just write a class that has references to all the display objects, and listens to your custom events. It also has the handlers in it to respond to the events. This in effect, is a "controller" class. Jason Merrill _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

