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]
1  Announcements and General Discussion / Architecture / Proxy in Proxy on: February 14, 2010, 03:10:45
It's normal or not?

:
public class TestProxy extends Proxy
{

private var mainProxy : MainProxy;

override public function onRegister() : void
   {
      mainProxy = facade.retrieveProxy( MainProxy.NAME ) as MainProxy;
   }
}
2  Announcements and General Discussion / Architecture / Targeting for proxie result on: April 24, 2009, 02:32:19
I have proxie class wihch load binary data from server. It's look like image downloader. Some parts of my application ask proxie to load some resources:

PersonalCardMediator.as

listNotificationInterests() : Array
{
   return [ ImageProxy.RESOURCE_LOADED ];
}

handleNotification( note : INotification ) : void
{
   switch ( note.getName() )
   {
      case ImageProxy.RESOURCE_LOADED:
      {
         if( firstUID == note.getBody().UID )
            ...
}

getImage()
{
   imageProxy.getResource( firstUID );
}

---------------------------

MainWindowMediator.as

listNotificationInterests() : Array
{
   return [ ImageProxy.RESOURCE_LOADED ];
}

handleNotification( note : INotification ) : void
{
   switch ( note.getName() )
   {
      case ImageProxy.RESOURCE_LOADED:
      {
         var UID = note.getBody().UID;
         if( secondUID == UID || thirdUID == UID || ... )
            ...
}

getListImages()
{
   imageProxy.getResource( secondUID );
   imageProxy.getResource( thirdUID );
   ....
   imageProxy.getResource( zUID );
}

and more
---------------------------

Problem is: If I send notify when complete load each resource, all my subscribed components must check, is needed resource or not. How I can optimize this?
Sorry for my English.
Pages: [1]