Here's a question for any Cairngorm devotees to weigh in on. I have an application that has many seperate parts that function independently of each other. Each part uses the centralized Cairngorm fare (FrontController, ModelLocator, Commands etc). For most parts using the ModelLocator and bound properties (ie dataProvider={model.users}) works perfect for keeping everything in order.
One case where this seems to fall apart is when one part or the shell application needs to notify the other parts of something that has happened. For example, a user logs into the application. I can update the model.user to reflect a value object for the new user and the various components that need to update on this do, BUT, what to do when I need something programatic to occur in one of the parts. I have tried unsuccessfully to use the 'mx.binding' classes. I think the issue there is that when you initially set the binding it is set to a specific instance of an object (ie model.user). When the user logs in I typically completely replace the model.user with a new user instance, which kills the bindings. The only way around this is to never replace object instances in the model but rather update them. Thinking this through though, that seems like a ticking time bomb. Any accidental overwrite of a instance in the model and all the bindings falls apart. What I have done in past, pre Cairngorm, applications it to create Manager classes, based on the Singleton pattern, that can dispatch events, and perform logic that doesn't really belong in a command or business delegate. For example an ApplicationManager class that can dispatch 'loggedIn' and 'loggedOut' events. Any part of the application can register as a listener and act appropriately upon receiving the event. My question then (to get to the point), is using a Manager class like this considered a best practice in the Cairngorm framework (mindframe) or is there a better or more acceptable method of doing what I would like to accomplish? Thanks in advance for any feedback, Derrick -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/