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 ... 3 4 [5] 6 7 ... 10
 41 
 on: April 04, 2016, 01:02:26  
Started by openoli - Last post by openoli
No, you can only use multicore version in a multicore project, and standard in standard. The project just contains the source of both.

Yes for sure ;-)
I was wonder merely if there's a tricky way to put both into one FB project with the only goal to push it directly to the github repo without the need of merging it manually.
But at the end it's probably more effort to discuss this here instead of just doing to it ;-)

Thanks,
Olaf

 42 
 on: April 04, 2016, 12:46:39  
Started by openoli - Last post by openoli
I'd say using the Notifier class which is common to both apps using PureMVC would be a reasonable way to do it

I think I'll try it this way.
Many thanks for your continued support, I appreciate it!

Olaf

 43 
 on: March 23, 2016, 07:36:38  
Started by openoli - Last post by puremvc
The Mediator class doesn't depend on the Event class. It is merely an idiom for it to add event listeners to its component. So there's no need to rewrite Mediator.

The component could just as well use a PureMVC Notifier instance (or extend notifier). and the Mediator would receive notifications from the components just like it receives them from other parts of the PureMVC system: Notifications.

This is usually not done, because A) we already have events in Flex/Flash, and B) to keep the component unaware of the PureMVC apparatus. However, in your case you're trying to make it so that the code is implemented the same way for JS as for Flash, and in that case you're going to have to make some compromises, and I'd say using the Notifier class which is common to both apps using PureMVC would be a reasonable way to do it.

Cheers,
-=Cliff>

 44 
 on: March 23, 2016, 07:29:01  
Started by openoli - Last post by puremvc
No, you can only use multicore version in a multicore project, and standard in standard. The project just contains the source of both.

Cheers,
-=Cliff>

 45 
 on: March 22, 2016, 12:44:24  
Started by openoli - Last post by openoli
Hi,
I've doing some tests using PureMVC with FlexJS and it seems that it works fine.
(If it makes sense I'll publish a PureMVC FlexJS version as soon as I'm able to create a swc of it)

What I'm currently trying to achive is to outsource the complete business logic to a pure AS3 lib using PureMVC.
My goal is to be able to switch between the "Flex standard SDK" and "FlexJS" without changing any line of the business logic. So the business logic has to be free of any flash or flex dependencies.

Cause the mediators main purpose is to handle view events it has a depenency to flash.events.Event (or org.apache.flex.events.Event for FlexJS).
To resolve the dependency to the view itself I'm using interfaces and that works fine.
But the interface itself also has currently a dependency to IEventDispatcher.

So I'm searching for a solution that makes the business logic flash/flex free while putting as much code as possible to it. In best case the app that uses the "business logic lib" tells the lib which kind of Event implementation it has to use respectively pass the 'right' Event implementation to it... some kind of a switch.

One solution that comes in my mind is to extend the concrete mediator, overwrite all methods that depends on Event and make it part of the app that uses the lib. But this would mean additional code.

Any ideas how to achive this much more elegant?

Thanks,
Olaf


:

// How to get rid of it?
import flash.events.Event;
//import org.apache.flex.events.Event;

public class MyMediator extends Mediator implements IMediator
{
    public static const NAME:String = 'ApplicationMediator';
    
    public function ApplicationMediator(component:IViewMyView) {
        super(NAME, component);
    }

    override public function onRegister():void {
super.onRegister();

         view.addEventListener(ApplicationEvents.DO_SOMETHING, onDoSomething);
    }

    // How to get rid of Event?
    private function onDoSomething(event:Event):void {
    }

    public function get view():IViewMyView {
        return viewComponent;
    }
}

:

// How to get rid of IEventDispatcher?
import flash.events.IEventDispatcher;
//import org.apache.flex.events.IEventDispatcher;

public interface IViewMyView extends IEventDispatcher
{
    function setData(data:String):void;
}

 46 
 on: March 21, 2016, 08:26:50  
Started by openoli - Last post by openoli
>please have a look at https://github.com/PureMVC/puremvc-as3-util-statemachine which has both a >standard and multicore version in the same repo

Do you merged the standard and multicore version manually to one repo or is there a way of having both in one (FlashBuilder) project?

Thanks,
Olaf

 47 
 on: February 14, 2016, 11:27:21  
Started by openoli - Last post by openoli
Thanks Cliff, I will check it out.
Olaf

 48 
 on: February 14, 2016, 09:26:04  
Started by openoli - Last post by puremvc
Hi Olaf,

If you create a pull request, please have a look at https://github.com/PureMVC/puremvc-as3-util-statemachine which has both a standard and multicore version in the same repo. If you can make the project structure similar, it will be helpful.

Cheers,
-=Cliff>

 49 
 on: February 04, 2016, 12:02:37  
Started by openoli - Last post by openoli
Hi Cliff,
I've already done the port to Multicore.
Additionally to the changing of the imports, I've had to inject the multitonKey at one place to get it work.
(See my post above).
Don't know if this is a proper way but it seems that it works. I'll test it a bit next days.

And yes, it would be great if you could create the GitHub repo!
I could create a pull request to this new repo that would contain all the files so that you could get it with less effort.

Olaf


 50 
 on: February 03, 2016, 02:56:31  
Started by openoli - Last post by puremvc
Hi Olaf,

Right. This utility unfortunately hasn't been ported to Multicore. However, it shouldn't be much of a problem to do that. To do this properly all you'd need to do is change the imports. If you are of a mind to do so, I'd be happy to create the GitHub repo and all that for the Multicore version.

Cheers,
-=Cliff>

Pages: 1 ... 3 4 [5] 6 7 ... 10