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
|
|
|
Show Posts
|
Pages: [1] 2 3 ... 10
|
3
|
Announcements and General Discussion / Architecture / Re: Pipes and the StateMachine Walkthrough
|
on: May 20, 2009, 07:28:46
|
Thanks for the kind words about the noodling 
Have a look at this: http://www.nutrixinteractive.com/blog/?p=132
Simon beat his head against this for days to get reliable disconnection.
One thing I can say is that Flex/Flash GC doesn't always seem to play by the rules and it's a little maddening to me sometimes. In the SoA app, currently, I've got a problem destroying visualizers. I can't seem to shake the little buggers loose. Of course I'm not connecting and disconnecting cores, just trying to make view components go away.
-=Cliff> PS: I added fullscreen mode for the app yesterday. Click on the application control bar or the visualizer to make it go fullscreen. Clicking again on the app control bar restores to normal, but the visualizer is one way; go full screen if not already, otherwise change the current visualizer. The code isn't up there because it's in a library now which'll be out as soon as I finish PureMVC TV with it.
I read Simon's post, and it isn't related to the GC. The Junction in a JunctionMediator isn't garbage collected because the fittings are still held. disconect() solves this, but leaves a null pointer in the array held by the other end of the pipe. The null is really my issue, when I disconnect I want it to cleanly disconnect, and don't see a reason why it would leave a null object in the other side's array of outputs. I've found that the GC is really sensitive to the retain count of objects. As it should be, but it is so easy to have rogue objects being stored on other objects which will ruin GC all the way up the display list. /edit so I am hacking at my issue and I made Pipe and TeeSplit extend EventDispatcher. When an output is connected to the TeeSplit is registers an EventListener (IPipeFitting got an addEventListener method). When a Pipe disconnects it dispatches a PipeEvent.DISCONNECT_FITTING event that the TeeSplit uses to invoke its disconnectFitting method on the event.target. Outside of the fact that I am hacking at the utility, this solution solves my problem and smells pretty good. Why is it bad? 
|
|
|
4
|
Announcements and General Discussion / Architecture / Re: Pipes and the StateMachine Walkthrough
|
on: May 19, 2009, 10:19:49
|
Nice. Thanks much for this, Joel. 
-=Cliff>
Best way to understand something for me is to break it down, rebuild, and document. Did I mention how much I dig your music on SoA? I was grooving to it all weekend while I worked on this :> I have a question regarding Pipes. I know it has been hashed over a bit and I've read the existing discussion, but I am still unclear about cleanly separating modules on unload. When the module receives the notification to disconnect, its JunctionMediator grabs its pipes (STDIN & STDOUT), calls their disconnect methods and then calls removePipe() on the mediated Junction. This effectively disconnects the dedicated pipe to the shell, but leaves me with a null output on the shell's STDOUT which causes an exception when the shell tries to broadcast a message. If I simply call removePipe() it doesn't cause the exception, but it also leaves the JunctionMediator in memory. It is disconnected from any facade, so it doesn't do aything in response to the messages, but it is still there (LEAK!) and I want it to die  So what I did was create a ManagedJunctionMediator that keeps a HashMap of the modules UID and the connections. It then goes through and physically removes the output from STDOUT. This is so nasty and stinks my code up, but I can't figure out how to remove individual outputs from a Pipe. I feel like disconnect() should remove the null output on the other end on the connection... What am I doing wrong?
|
|
|
6
|
Announcements and General Discussion / Architecture / Re: Basic data type to Strongly typed VO via Proxy or command?
|
on: May 11, 2009, 02:48:12
|
I always do the conversion from XML to VO inside of the proxy saving the VO on the proxy as the data and place a public getter on the proxy to retrieve the typed VO. The proxy parses the VO and then sends out a message saying that it has finished parsing perhaps with the VO as the body for convenience.
I will also sometimes have an optional property on the constructor of the VO for XML so that it will simply do the parsing there to keep my proxy clean since the XML parsing for the VO is specific to that object anyway. Alternatively I will also create helper classes that do the XML parsing outside of the proxy.
Personally, I don't like passing around XML at all in my systems if I can avoid it.
|
|
|
7
|
PureMVC Manifold / Standard Version / I spent the weekend using this port...
|
on: April 19, 2009, 08:41:46
|
This is the first time I've actually used one of the PureMVC ports, and I have to say it is awesome to drop into a language that I have less confidence with and get some sense of instant familiarity.
Thanks for porting PureMVC to Obj-C. It has made me very happy.
Cheers!
|
|
|
9
|
Announcements and General Discussion / General Discussion / Re: unlist notification interest in mediator?
|
on: March 15, 2009, 12:26:05
|
Unfortuately I haven't the time to do another demo of the StateMachine at the moment as I am buried in work, but I can say a few things about the it and the new changes. First, it does not rely on binding, although the StopWatch demo does use it in a contained way in the view components (as do most of the Flex/AIR demos). Second there end up being far less reliance on the entering/exiting notes, its 'changed' that triggers state specific goodness once the machine has reached the new state. And the need to stash flags or temporary data for the next state to go pick up is reduced by the ability to tunnel data to the new state via the ACTION note. And states can now re-enter themselves. Definitely worth a look if you're struggling with state, I can tell you. I've got a nice chunky app purring along like a kitten thanks to it now and can't imagine starting another project without it.
-=Cliff>
I'm working it into my next project. Really looking forward to it based on your recent enthusiasm :>
|
|
|
12
|
PureMVC Manifold / Standard Version / Re: Notification, "type" property ?
|
on: March 04, 2009, 09:46:24
|
thank you for the answer. i stuck in the middle of your answer. i need clarification before continue. you said that every document have his own DocProxy, but you can create only one Proxy that handle the specific data for it. in the Model code you have have only 1 Proxy for that proxy name. how can you create multi proxies from the same type?
10x, Nisim
public class MyProxy extends Proxy implements IProxy { public static const NAME:String = "MyProxyName::"; private var instanceUID:String;
public function MyProxy(instanceUID:String) { this.instanceUID = instanceUID; super(this.getProxyName(), new myVO()) }
override public function getProxyName():String { return NAME+this.instanceUID; } } http://forums.puremvc.org/index.php?topic=596.0Here is some discussion on the subject.
|
|
|
|
|
|