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: Difference between multicore and standard ?  (Read 4170 times)
2009 Matt
Newbie
*
Posts: 3


View Profile Email
« on: January 25, 2009, 02:57:24 »

I'm new to PureMVC.

I know the implementation of standard version uses lots of singleton, but multicore.
Is there any difference in API level? Performance difference? Which one is a better choice for
a new Flex project?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: January 27, 2009, 06:24:11 »

It is virtually the same. A map of singletons for the primary actors allows 1 per 'core' (i.e. Main app or loaded module/swf).

Performance wise there's only the overhead any modular project will have over and non-modular project.

Of course API wise there are methods for adding, removing and checing for the existence of cores by name. And getInstance for the MVCF actors takes a string for the core name, as each needs a unique key.

And in the MultiCore version you must not try to access the local reference to the Facade in your Mediator or Proxy constructors, as they will not be given a reference to their Facade until initializeNotifier is called. However it turns out that it is a best practice in both versions to wait until onRegister anyway, because you don't want to start any conversations you're not registered and ready to participate in.

Other than that, the two versions are basically the same. I suggest starting projects that will be unit tested in MultiCore even if they aren't modular. This is because you can get a fresh 'core' for each test.

-=Cliff>
Logged
yomane
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: February 26, 2009, 01:15:33 »

I have a question regarding multicore vs standard.

On the gwt port, it seems that there is a difference in the way to add subCommands in a MacroCommand. 

In standard version, MacroCommand.addSubCommand expects a reference to the command.class to be instanciated by the controller upon notified, as stated by the best practiced documentation.

:
    protected void addSubCommand(Class<? extends ICommand> commandClassRef) {
        this.subCommands.add(commandClassRef);
    }


With the multicore version,  MacroCommand.addSubCommand expects an instanciated ICommand object.  So, when should the command be instanciated then ? 

:
protected void addSubCommand( ICommand commandClassRef )
{
this.subCommands.addElement( commandClassRef );
}

Aside from the fact that the documentation refers to singletons only, are there other aspects of the multicore version that are not covered in the documentation ?

Thanks

Bruno

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: February 26, 2009, 06:13:18 »

Hi Bruno,

This is one best left for the Java MultiCore port owner. If you could repost there it might catch his attention. You're right, this shouldn't operate differently from the reference if possible.

-=Cliff>
Logged
yomane
Newbie
*
Posts: 2


View Profile Email
« Reply #4 on: February 26, 2009, 06:44:54 »

Yep, you're right, wrong section.  Sorry.

Thanks for replying.
Logged
Pages: [1]
Print