PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: skasssam on October 24, 2008, 06:18:39



Title: Question about resetting an application built with PMVC
Post by: skasssam on October 24, 2008, 06:18:39
I have an application that uses deferred instantiation (mediators and proxies are only created when needed). When the user logs out, I would like a way to 'reset' the application into its initial state. Right now I am reloading the page that the application is loaded from but I am not sure what the PMVC approach might be.

Any help is appreciated. Thanks.


Title: Re: Question about resetting an application built with PMVC
Post by: Jason MacDonald on October 24, 2008, 06:20:59
Create a command that will "shutdown" your app, deleting all child objects not needed and removing mediators and proxies. It's much easier if you start building your app with this in mind, adding to the shutdown command as you go. I admit it can be much tougher if your app is already done.


Title: Re: Question about resetting an application built with PMVC
Post by: skasssam on October 24, 2008, 06:30:08
Thanks for the reply.

I was actually working on this yesterday and just realized the stupid mistake I was making. I was removing my mediators and leaving the proxies. Crap, I was wondering why the data was still stale. Duh...amazing what a night of good sleep will do for you.

Thanks.