PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: saad on September 03, 2015, 01:35:41



Title: Using PureMVC to build SDKs, Libraries and Frameworks
Post by: saad on September 03, 2015, 01:35:41
Hello Cliff,

I'm brainstorming on the architecture and how to approach building API's and Library Frameworks using Multicore PureMVC that can be linked by both PureMVC (preferably) and non PureMVC apps.

Typically ShellModule/ShellFacade can be instantiated that further instantiates other modules and plumbs them. Can you please comment on what'd be the right approach to leverage the functionality of those modules from outside the Shell and get results back from their inner workings.

Basically the intent is using PureMVC framework to build other Frameworks. Thanks.


Title: Re: Using PureMVC to build SDKs, Libraries and Frameworks
Post by: puremvc on September 03, 2015, 05:27:15
Let the shell expose an interface. It can act as a mediator between the modules and the outer framework.


Title: Re: Using PureMVC to build SDKs, Libraries and Frameworks
Post by: saad on October 06, 2015, 08:04:18
Thanks Cliff. I've finally worked out an implementation, since SDK is a multicore and internal communication is Async using pipes, so users of the library have to submit a Formal Request providing requestData, requestType and a callback (native kind) while shell is exposing an interface to that.

Based on the requestType the shell pipes the request to respective module, and once it gets back the serviceRequest with resultData it notifies the observer in a command that in turns calls the user's callback method.

This one is for non PureMVC users and inner PureMVC implementation is hidden.

For PureMVC users which I've not implemented yet, the idea is shell inheriting from PipeAwareModule and connecting the input/output pipes to shellJunction and then I think I'd need an Uber Shell that connects the user's module and SDK's module.