PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: creynders on April 02, 2008, 12:30:26



Title: Questions about Indexcards example and registering proxies
Post by: creynders on April 02, 2008, 12:30:26
If I understand it correctly then commands are registered to one specific notification.
When I look at the commands in the Indexcards example, 3 of them check the notification name to perform different actions.
I don't quite understand how this works. I've searched through the code and found all of the commands to be registered to one notification, so how is this possible?
Do they still receive the other notifications, even though they're only registered to one specific notification? And if that's the case, then why register them to one notification at all?

Another question I had is concerning registering proxies. At the moment I have deferred instantiation of mediators, but all proxies are registered at startup, just because I didn't know where else to register them. Am I correct in assuming that they could be registered in a different command? And would it be ok if they are registered in mediators?

Probably these are questions with obvious answers, but I'm having a hard time figuring out what is good practice and what not.

BTW Cliff, congratulations on a magnificent job. I'm really enthousiastic about this framework, even though I don't fully grasp it yet.


Title: Re: Questions about Indexcards example and registering proxies
Post by: lingie on July 08, 2008, 03:07:50
Just wondering if there was a reply to this post...?


Title: Re: Questions about Indexcards example and registering proxies
Post by: puremvc on July 11, 2008, 05:57:06
Sorry, I'm replying from my phone and can't see the index cards code right now. I'll have to return to that.

But for registering Proxies, yes it can happen elsewhere/when. Just make sure that anything that may expect them to be available either doesn't ask for them until they are there, or can detect and cope with it if they're not there.

-=Cliff>