Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: How to use Singleton Facade in Modular Applications  (Read 8055 times)
diegovolpe
Newbie
*
Posts: 7


View Profile Email
« 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
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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
Logged
Pages: [1]
Print