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

Show Posts

* | |

  Show Posts
Pages: [1] 2 3 ... 10
1  Announcements and General Discussion / General Discussion / Re: Thoughts on Robotlegs on: August 16, 2010, 04:40:56
An obvious downside is that it is coupled pretty closely to the AS3 compiler for its use of metadata. See this article for my thoughts on why that's a bad idea: http://puremvc.org/content/view/159/181/



Here's an example of Robotlegs sans-meta and my general thoughts on the use of metadata annotation in AS3.
2  Announcements and General Discussion / General Discussion / Re: Mediator or Proxy on: November 18, 2009, 02:07:14
You can mediate the surrounding HTML wrapper on the view. That's how I'd approach it anyway. If there was data transfer happening, then I'd put that on the model, but conceptually I think you're on the right track here.
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:

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.

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.

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.  ;)


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?
5  Announcements and General Discussion / Architecture / Pipes and the StateMachine Walkthrough on: May 18, 2009, 01:44:52

I took the Sea of Arrows player and deconstructed the elements to create this walkthrough of the process of combining Multicore PureMVC, Pipes, and the StateMachine in an application.
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.

8  Announcements and General Discussion / Getting Started / Re: need advice for rewrite existing flex app using puremvc on: March 18, 2009, 09:07:04
Only one mediator will ultimately be registered with this method. Do a search for dynamic mediators.
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.


I'm working it into my next project. Really looking forward to it based on your recent enthusiasm :>
10  Announcements and General Discussion / General Discussion / Re: unlist notification interest in mediator? on: March 06, 2009, 05:28:03
Why don't you send a notification out at the time when the AppMediator no longer needs to listen for a notification that turns a boolean switch on AppMediator? Then you test against this switch in the notification handler and return out if it is appropriate to do so.

11  PureMVC Manifold / MultiCore Version / Re: How to use Multicore, in what kind of project on: March 05, 2009, 06:43:04
i know that need to use it, but i need example of kind of projects that need it.
en example can help here.


I use it for all projects.


There's like 12 demos and utilities available.
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?


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;


Here is some discussion on the subject.
13  Announcements and General Discussion / Architecture / Re: Mediators / Notification and System Memory AS3 Flash on: March 04, 2009, 09:43:13
Bitmap data is kind of a bear to get rid of on occasions. I have found myself digging into the bitmapdata and running dispose then null:

bitmap.bitmapData = null

that does the trick every time ;)
14  PureMVC Manifold / MultiCore Version / Re: How to use Multicore, in what kind of project on: March 04, 2009, 09:34:25
The standard version is kept as the reference standard for ports and systems that don't support multicore. It is recommended to use the multicore version for all AS3 projects.
15  Announcements and General Discussion / Architecture / Re: Composite data structures: Advice needed for creating the model structure on: March 01, 2009, 05:29:01
"There is a utility called PGProxyReservation listed in the 'Public Apps, Demos and Utilities' area of these forums that I believe is geared to this sort of scenario. You might want to scope that out before implementing."

This utility works really well after a few tweaks to handle dynamically named proxies.


I've used it in production on multiple projects.
Pages: [1] 2 3 ... 10