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: I have smaller and now needed one big application  (Read 12882 times)
vladakg85
Full Member
***
Posts: 22


View Profile Email
« on: September 21, 2009, 06:23:13 »

Hi,

I have made a few smaller applications that I build on 'single core pure MVC'.
Applications like:
 - calculator
 - calendar
 - address book
 - HDD browser
 - etc.
Not I want to have one application that can have a buttons where each buttons opens some of my smaller applications.

Is there any example how to get started with this?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: September 21, 2009, 07:27:02 »

Refactor your existing applications to MultiCore, and then build a shell that loads and displays the smaller apps.

The refactoring won't be difficult, but this points out the reason that I advocate starting with MultiCore. The differences are trivial and you save yourself the work of refactoring later.

You'll need to swap out your PureMVC library, change all your imports, write a MultiCore style getInstance for your concrete Facade and call getInstance with a string that is the unique key for the core in question.

Also, if you have made any references to the facade in your Mediator or Proxy constructors, you need to move those to onRegister. This is now considered the best practice even for the Standard Version.

-=Cliff>
Logged
vladakg85
Full Member
***
Posts: 22


View Profile Email
« Reply #2 on: September 22, 2009, 07:49:21 »

Lucky me, this is training project :)
Ok, I transfer all my simple applications to the multycore PureMVC, it works, fine. But now I don't have any idea how to combine this. I saw 'modularity' project. And I try to add my simple app there but... I add same widget component like others and I get button but that i snot my component. I am not sure that I understand how to create modular app. Is there any simpler tutorial/project?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: September 22, 2009, 08:36:22 »

Unfortunately, at the moment, I don't have a simpler tutorial for MultiCore interface communications. Modularity is pretty close to the bare minimum to demonstrate multiple modules communicating bidirectionally with a Shell via interfaces. I even skipped the loading of modules since we're focused on communications and it really doesn't matter whether a module was loaded or instantiated.

If you're having troubles getting your stuff to work, I would suggest studying that fairly well documented demo a bit further to make sure that you understand what it's doing from end-to-end before hacking the source.

-=Cliff>
Logged
vladakg85
Full Member
***
Posts: 22


View Profile Email
« Reply #4 on: September 23, 2009, 12:36:06 »

OK. Can you explain me what is the difference between modularity demo and  pipes? As I see modularity use flex modules but with pipes not, am I right?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #5 on: September 24, 2009, 07:11:52 »

There are 2 ways to facilitate communication between cores in a MultiCore app: Interfaces and Pipes.

With interfaces, at least one core (modules and the main app are both 'cores') has a reference to the other, typed to an interface not an implementation, and invokes methods on that reference.

With the pipes utility, cores are 'plumbed' to each other using 'pipelines' composed of 'pipe fittings' that perform various functions such as filtering, splitting merging, queueing, etc. Cores communicate by sending messages down the pipelines.

Here's a short overview of MultiCore and the options for communications infrastructure:
http://puremvc.tv/#P002/

-=Cliff>
Logged
vladakg85
Full Member
***
Posts: 22


View Profile Email
« Reply #6 on: September 28, 2009, 02:37:11 »

I don't want to see Flex modules any more in my life (personal hate) :).
I want to learn to work with pipes, and I miss something. My project is attached here, can anybody tell me what I doing wrong?
Logged
vladakg85
Full Member
***
Posts: 22


View Profile Email
« Reply #7 on: September 30, 2009, 01:23:22 »

Is it so bad?  ???
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #8 on: September 30, 2009, 08:52:13 »

Perhaps you could give us a hint about what the specific problem is you're trying to solve and how you've approached debugging it? It's difficult to find the time to troubleshoot full applications, but I'm always happy to help point the right way if you can tell me where you're stuck.

-=Cliff>
Logged
vladakg85
Full Member
***
Posts: 22


View Profile Email
« Reply #9 on: September 30, 2009, 11:56:43 »

Ok, I made simple module HelloModule like a separate project. And I created project that I attached here and move HelloModule to this project like PipesWorks demo. I want to have one button on my shell project that when I click on it starts my Hello module. Hello module have one button which popup Alert with some message. I want to understand how this mechanism work so I can add more and more modules to shell project.
Problem: When I click on hello button that should print Alert message it tells me that this button is null. I believe that my problem is because I didn't add any Junction to shell or module project I don't know how to do this :(. But this HelloModule when it is in separate project works.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #10 on: October 02, 2009, 06:43:57 »

Have a look at Jens Krause's Hello Pipes demo. I think it's a little simpler, perhaps.

http://www.websector.de/blog/2008/06/21/a-basic-puremvc-multicore-as3-example-using-pipes-utility-and-modules/

-=Cliff>
Logged
Pages: [1]
Print