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 / Filtering on: January 27, 2011, 11:57:36
Hello, I'm building a pureMVC based Application with multiCore version and pipes and I wanted to know what is the right/best way to send a message from the shell through the TeeSpleet to only one module.

if the shell send a message through the TeeSplit - everyone get the message and need to check if it's for them.
it's a little bit ineffective I think.

so what is the right way?

thanks !
2  Announcements and General Discussion / Architecture / Pipes Architecture question on: January 20, 2011, 09:59:18
Hey guys,
I want to know what is the best practice about pipes.
in my app I got:
1) shell (ofcourse)
2) server module which must be loaded first (and never be removed)
3) other modules

now, if I load a module. should it communicate with the server module through the shell module
or I should connect them together directly (like "p2p") and the shell only manage the first connection between them?

In my opinion, the second option is better
what do you think?
3  PureMVC Manifold / MultiCore Version / Why null ? on: January 09, 2011, 11:01:52
Hello,
I moved from standard to multiCore, and of course, it's pretty much the same
and as for my problem, I don't think it's matter:

I'm creating a facade in this way:

public function MyFacade(key:String)
{
   super(key);
}

this is the getInstance function:
public static function getInstance(key:String) : MyFacade
{
      if(instanceMap[key] == null) instanceMap[key] = new MyFacade(key);
         
   return MyFacade(instanceMap[key]);
}

this is the initializeController function:
override protected function initializeController():void
{
         registerCommand( ShellConsts.STARTUP, StartupCommand );
}

I get on this function this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at org.puremvc.as3.multicore.patterns.facade::Facade/registerCommand()

why is that?  :o

thanks in advanced
4  Announcements and General Discussion / Architecture / Re: using the same Command ? on: August 14, 2010, 01:31:22
In this case you could use two commands as you've described, or you could use the type parameter as a way to switch the functionality of the command. Type could be set to UserInfoCommand.REQUEST or UserInfoCommand.REPLY, for instance, and the execute method could perform different actions based on the result of notification.getType().

Also, if the same mediator that requested the data is one needing to use it, then you can skip the command and just have the mediator retrieve the proxy, get the data and set it on the view component. The command is useful if more than one mediator is involved. For instance if you click on the character but you need another mediated component to display the information about the clicked character.

-=Cliff>

cool. thanks Cliff
5  Announcements and General Discussion / Architecture / using the same Command ? on: August 12, 2010, 12:01:03
Hey,
I need to understand something about the architecture.
I'm building a flash game (AS3) and when the user is pressing on a character
the mediator sending a USER_INFO_COMMAND
the command speak with the Proxy to get the data

worldProxy.getUserData(id:String);

this funciton getUserData sendingNotification back to the Mediator.
is there any way to use the same Command (USER_INFO_COMMAND)
or I need to split it to 2 commands? (USER_INFO_REQUEST & USER_INFO_DATA)

what is the right way?
thank you very much :)
6  Announcements and General Discussion / Getting Started / Re: Standard VS Multi on: August 11, 2010, 02:29:04
If you use MultiCore to start, there is no more overhead than using Standard and you don't have to use modules. The benefit is if your program grows to the point where it would make sense to modularize, you don't have to migrate from Standard to MultiCore at that time.

-=Cliff>

thanks Cliff
7  Announcements and General Discussion / Getting Started / view-model connection on: August 11, 2010, 02:28:12
Hey,
I'm new at PureMVC and I'm buiding a flash game.
on the screen there are characters (visual)
in the model I got a collection of CharacterVO (data)

when the user is pressing on some character, I want to show the user info about the character.
how you do it?
I need to find a way to connect visual to data.

I thought about holding an ID property in the visual class.
is that a good way?

thanks,
Dave
8  Announcements and General Discussion / Getting Started / little question on: August 10, 2010, 01:20:37
what is the meaning of VO I see everyWhere ?
thanks  ;)
9  Announcements and General Discussion / Getting Started / Standard VS Multi on: August 10, 2010, 09:49:39
Hello,
I'm building a flash game using PureMVC
the game is pretty much complicated.
it will have few screens (edit character for example)

what is feet for me?
Standard or Multi (and why?)

it's very important to me to make the right choise
thanks in advanced
David
10  Announcements and General Discussion / Architecture / Re: question about Architecture on: August 10, 2010, 09:47:04
You might just make the UserProxy hold a collection of User objects rather than having a separate UserIDProxy instance registered for each user. This means you can iterate over all users, as well as keeping an associative array by name or ID.

-=Cliff>

thanks, and where is the best place for the collection?
11  Announcements and General Discussion / Architecture / question about Architecture on: August 10, 2010, 06:18:55
Hey, I'm new with PureMVC and I got a question about my architecture.
In my applicaion I'm managing users, so I created: UserIDProxy
when user is created (by a press of a button for example) I create UserIDProxy and add it
to the facade with registerProxy() method.

as I said, I want to manage the users. for example to check how many users there are in the system
or make search by name/id.
how am I doing it?

I thought about creating UsersProxy class which will manage all the UserIDProxy objects
is that good idea?

thanks in advanced,
David
12  PureMVC Manifold / Standard Version / viewComponent Question on: August 09, 2010, 01:32:23
Hello,
I'm using PureMVC with AS3 platform.

so, I got a viewComponent. for example a Sprite or a MovieClip
the component should communicate with the mediator through events.
my question is how to do it?
should all the components extends EventDispatcher?

thanks in advanced
David
Pages: [1]