Title: plugin architecture using PureMVC - advice needed Post by: atarsh on July 19, 2010, 08:53:25 Hi all,
We have an application built on PureMVC. We allow our users to develop plugins for the application. As long as the plugins have a view component and a mediator everything works well, but when a plugin doesn't have a view (and therefore no mediator), PureMVC expects you to use commands and proxies. Our problem emerges when a plugin tries to register a command with a notification that already has a registered command. The plugin command overrides the original command (thus causing the application to stop working - dhaa). I understand this is how the PureMVC framework works (the override), but I'm trying to think of a way to allow external developers who don't know the internal code to the details to develop view-less plugins. One way that I notices can work is by misusing the fact that the view component registered with a mediator is typed to generic Object - so I can actually pass my "logic component" there instead and avoid adding it to stage, then use the mediator to communicate with the app just like a view would. But that is, as I said, misuse :) So, before I go extending the framework to support multiple commands for each notification - anybody has any ideas? Title: Re: plugin architecture using PureMVC - advice needed Post by: puremvc on July 22, 2010, 07:24:44 Are you using MultiCore? If so it wouldn't be a problem, since each core has it's own notification list. For a plugin architecture, I would definitely expect to use MultiCore.
-=Cliff> Title: Re: plugin architecture using PureMVC - advice needed Post by: atarsh on July 22, 2010, 08:18:59 we are not using the multicore. although I can see how it'll solve the commands problem, we use the notifications cross-application to communicate between the core application and its plugins, so different notification systems will harm us there.
If I understand you correctly, you mean using a different core for each plugin? can the different cores "hear" each other's notifications or are they completely separate? thanks, Atar. Title: Re: plugin architecture using PureMVC - advice needed Post by: puremvc on July 22, 2010, 09:15:29 You can send messages between cores using pipes and messages. The notifications inside each core are not heard by the other cores.
-=Cliff> Title: Re: plugin architecture using PureMVC - advice needed Post by: atarsh on July 25, 2010, 12:13:59 if you had to plan the architecture for an application and its plugins, is that how you'd do?
Title: Re: plugin architecture using PureMVC - advice needed Post by: puremvc on July 25, 2010, 01:37:20 Absolutely.
-=Cliff> Title: Re: plugin architecture using PureMVC - advice needed Post by: atarsh on July 25, 2010, 11:58:57 We'll have to consider this, because the project is already live and changes to its core are.. well.. complicated..
thanks a lot, anyway :) |