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 4
16  Announcements and General Discussion / Architecture / Re: Memory Usage and Multi-core on: June 29, 2009, 01:13:48
17  Announcements and General Discussion / Architecture / Memory Usage and Multi-core on: June 29, 2009, 08:49:15
So my app is up in beta, but now I get to do a major rewrite....maybe.

So I have an app, built on Single version of PureMVC, which can be extremely processor intensive. I let the user switch between two views, possibly five views in the future. When the user switches between the two views I remove all the proxies, mediators, etc... and build the new view from scratch. So I was thinking about moving to multicore to allow for a document based application so the user can have tabs open (like Firefox) and switch between views.

The question I have is, since a single view right now can eat up memory and cpu, would using modules and multicore in a document based app be ok or would it kill the CPU and eat more memory?  I would think if I put the views in a tab navigator it the views that aren't being shown wouldn't eat up as much memory if they aren't being rendered and not animation or data processing is going on in those views, right?

Are modules the best way to go here? Maybe it would be better to create new view objects in a tab navigator, rather than modules with view objects in each tab navigator? Honestly, I hate dealing with modules, but if it will give the best performance then so be it.

Maybe sticking with what I have would be the best way, given the processor and mem usage of the app?

18  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Flex Gumbo && IT Network Map with PureMVC on: June 28, 2009, 06:51:41

@Cliff will send you some screen shots sometime this week.

19  Announcements and General Discussion / Public Demos, Tools and Applications / Flex Gumbo && IT Network Map with PureMVC on: June 27, 2009, 11:32:35
My Flex 4 Gumbo app just went into beta. Screen shot made TechCrunch, yeh!

Video demo here: www.flairjax.com/?p=72

If you want to see it in person download and hook it up to your network at work here:
www.spiceworks.com (4.0 Beta)
20  Announcements and General Discussion / General Discussion / Re: FLEX GUMBO ISSUES on: June 16, 2009, 10:18:17
Not sure if it matters but I am on single core?
21  Announcements and General Discussion / General Discussion / FLEX GUMBO ISSUES on: June 16, 2009, 09:37:52
Wondering if anyone is using PureMVC with Flex Gumbo yet?  I have been using the beta or alpha for about 3 months now and my trial expired today.  So I installed the official release BETA and changed all my namespaces over to the new ones, compiled the app, and half my app doesn't work.

For instance, I have a stage mediator that on a certain action I call a function <Application> from the stageMediator that creates a popup.  But now on the new BETA that function is called and it never reaches the function in <Application>.

Any suggestions?
22  Announcements and General Discussion / Architecture / Re: Backed into a corner with Single Core on: June 04, 2009, 09:58:31
Thanks Nils
23  Announcements and General Discussion / Getting Started / Re: Using PureMVC and the ExternalInterface on: May 29, 2009, 08:36:07
Cliff, I have copied your example, but it appears that my ExtInterfaceMediator isn't hearing any of the callbacks.  Firebug tells me the functions have been called, but my swf isn't hearing them. Any suggestions?

public class ExternalInterfaceCommand extends SimpleCommand
       // Called by the MacroCommand
       override public function execute( note : INotification ) : void
            // Create and register proxy
            if( facade.hasMediator( ExternalInterfaceMediator.NAME ) ){
               facade.registerMediator( new ExternalInterfaceMediator() );

public class ExternalInterfaceMediator extends Mediator implements IMediator
        private var _httpservice:HTTPService;
      public static const NAME:String = 'FABridgeMediator';
      public function ExternalInterfaceMediator()
         super(NAME, null);
         // Add Listeners
         if (ExternalInterface.available)
            ExternalInterface.marshallExceptions = true;
              // a method that will be invoked from JavaScript
              ExternalInterface.addCallback("filterMap", onFilterMap);
              ExternalInterface.addCallback("launchOpeningInfo", onLaunchOpeningInfo); // <<--- Need to put this in the javascript
              ExternalInterface.addCallback("refresh", onRefreshTheData);
              ExternalInterface.addCallback("switchMode", onSwitchMode);
              ExternalInterface.addCallback("switchLayout", onSwitchViews);
            public function onFilterMap( filtertype:String ):void {
               /* var fse:FilterSelectedEvent = new FilterSelectedEvent( FilterSelectedEvent.FILTER_SELECTED_EVENT, true, false, filtertype);
                fse.filterGroupName = filtertype;
                this.dispatchEvent( fse );*/
                facade.sendNotification(ApplicationFacade.FILTER_SELECTED, filtertype);
                _httpservice = new HTTPService();
               _httpservice.url = "/inventory/map_filter_selected";
               _httpservice.method = "GET";
               _httpservice.useProxy = false;
               _httpservice.addEventListener( ResultEvent.RESULT, incrementFilterClickedStatsResult );
               _httpservice.addEventListener( FaultEvent.FAULT, incrementFilterClickedStatsFault );
            public function onLaunchOpeningInfo():void {
                facade.sendNotification( ApplicationFacade.SHOW_OPENING_INFO_PANEL );
            public function onRefreshTheData() : void
               facade.sendNotification( ApplicationFacade.EXTINT_CALLS_DATAREFRESH );
            public function onSwitchMode( modetype:String ):void {
               sendNotification( ApplicationFacade.SWICH_GRAPH_MODE, modetype );
            public function onSwitchViews( newview:String ):void {
                //TODO: this should probably be a case statement incase we have more than 2 views.
                facade.sendNotification( ApplicationFacade.SWICH_GRAPH_LAYOUT, newview );
                facade.sendNotification( ApplicationFacade.SCROLL_HOME_NAVCIRCLE, newview );
      private function incrementFilterClickedStatsResult(event:ResultEvent):void{
            trace( 'Result: increment filter clicked stat successful');
            _httpservice.removeEventListener( ResultEvent.RESULT, incrementFilterClickedStatsResult );
            _httpservice.removeEventListener( FaultEvent.FAULT, incrementFilterClickedStatsFault );
        private function incrementFilterClickedStatsFault(event:FaultEvent):void{
            trace( 'Fault: increment filter clicked stat fault' + event);
            _httpservice.removeEventListener( ResultEvent.RESULT, incrementFilterClickedStatsResult );
            _httpservice.removeEventListener( FaultEvent.FAULT, incrementFilterClickedStatsFault );
      override public function listNotificationInterests():Array
         return [
      override public function handleNotification(notification:INotification):void
         if (ExternalInterface.available) {
            switch ( notification.getName() )
               case ApplicationFacade.GRAPHCHANGED:
                   ExternalInterface.call("MyMap.filtersReady", notification.getBody as Array);
                 default : break;

Thanks for any help.
24  Announcements and General Discussion / Architecture / Re: Backed into a corner with Single Core on: May 24, 2009, 12:45:21
Thanks will see what I can do.
25  Announcements and General Discussion / Architecture / Re: Backed into a corner with Single Core on: May 22, 2009, 09:51:40
How difficult would it be to go multicore?
26  Announcements and General Discussion / Architecture / Backed into a corner with Single Core on: May 22, 2009, 01:43:31
So I have this fairly large Flex/AS3 application built on Single Core PUREMVC. I was 95% done with the project (think google maps for it networks) and now they want a new view, which does half what the old did and half a bunch of new stuff.

So what I tried to do is keep Single Core version and when they switch views send a TEARDOWN notification so all mediators and proxies get removed.  Then I create the new view, but half my functions don't work and I have a feeling the new view is getting hold of the old mediators somehow? I can't seem to track down why things aren't working, for instance in my displayMediator I have a reference to something on the mainstage and when I try to reference the mainstage in the new displayMediator it comes back null.

So knowing its a google maps type app where I have a couple of zoom / pan controls which always need to be on top of the stage what do I do next?  Would switching to multicore be the solution please say no as I can't imagine how many hours its going to take to transition everything over?

Help me please  :-[, Jason
27  Announcements and General Discussion / General Discussion / ServiceLocator RemoteObjects? on: May 21, 2009, 07:37:42
So how would you implement a Cairngorm style servicelocator in Puremvc?

I am thinking you would have some sort of "Main" proxy, for instance, I have a stage mediator that listens to the stage for certain things so maybe a StageProxy would be the best location for this servicelocator or would I create some sort of ServicesUtil.as that the StageProxy would then use to its liking?
28  Announcements and General Discussion / Architecture / State Machine??? on: April 29, 2009, 12:56:41
So I have a Flex application that will have up to 1100 items on screen at all times (zoomable) and for right now they are all static, meaning once on screen they won't change.  But, in the release we need to have each of the object be dynamic, meaning that depending on the VO they are passed they need to update their color, size, shape, and position on the stage. Some may even disappear be removed all together and some new ones added depending on the data thats pushed in. The user will also be able to drag the items to different positions on the screen.

Also in the next release, when the user leaves the app, I need to save the state of each of the 1100 items (their position on the stage, color, shape, size, etc...).

So I am thinking local shared object, but do I or can implement the PureMVC StateMachine? Or is their a better way to do this?

Also I am using the Single Version of PureMVC.
29  Announcements and General Discussion / General Discussion / Mediator already exists on: March 30, 2009, 11:54:59
If a mediator and proxy already exist for viewComponent will a call to facade.registerMediator create another one and destroy the old one or will it just pull back the old one?

Is it better to do something like

if( facade.retrieveMediator( "mymediatorname" ) ){
 // do nothing skip creating a new one.
30  Announcements and General Discussion / General Discussion / Re: How to handle ONLY ONE callout on: March 26, 2009, 08:43:04
mainstage is my name for the viewComponent in the stageMediator.

Sorry about the naming probably confused you. See change below.

Code on mx:Application -------------------------
public function removeSuperDetails() : void
               sdc = null;
               this.dispatchEvent( new Event ( NODECALLOUTCLOSED, true ) );
Pages: 1 [2] 3 4