PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: diegovolpe on January 04, 2008, 06:02:38



Title: How to use Singleton Facade in Modular Applications
Post by: diegovolpe on January 04, 2008, 06:02:38
Hi Cliff,

We're trying to use PureMVC in a modular application and we couldn’t use the default implementation of Façade.
That´s the scenario:
MainProject (using PureMVC)
Module1 (using PureMVC)
Module2 (using PureMVC)
*Each module and the MainProject were implemented in separate projects

The Problem:
When you try to access the Façade implementation of any Module (each module has its own implementation that extends from Façade) the system returns the MainProject instance.
We’ve created our own Abstract Façade (copy default Façade code and remove the singleton behavior), turning it in a non-singleton class. The Singleton behavior is now living in the concrete implementation.

It seems to work, and we could use PureMVC inside modules successfully.
We tested other possibilities, but that’s the only one that worked. What do you think about it? Is there any other way to do that without changing the framework?

Thanks in advance,
Diego Volpe and Rodrigo


Title: Re: How to use Singleton Facade in Modular Applications
Post by: puremvc on January 04, 2008, 07:32:25
Hi guys,

Have a look at this post by Nate Rock, who has done a bit of work with Modules. He's actually putting together a formal demo, but for now this should point you in the right direction:

http://forums.puremvc.org/index.php?topic=49.0