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: Using PureMVC to build SDKs, Libraries and Frameworks  (Read 9498 times)
saad
Sr. Member
****
Posts: 65


View Profile Email
« 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.
« Last Edit: September 03, 2015, 01:39:39 by saad » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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.
Logged
saad
Sr. Member
****
Posts: 65


View Profile Email
« Reply #2 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.
« Last Edit: October 07, 2015, 04:55:36 by saad » Logged
Pages: [1]
Print