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 / Re: How to synchronize easily 2 notifications ? on: November 27, 2008, 03:29:05
Hi Cliff !

Wahou, that's really great, thanks a lot, let us know when we can try this cool utility  :) ! Thanks a lot for all the job that you've done so far and are doing, it helps us so much everyday, thanks a lot  :D !
2  Announcements and General Discussion / Architecture / Re: How to synchronize easily 2 notifications ? on: November 26, 2008, 07:33:42
Thanks a lot for your fast answer Cliff !

My problem here was that this was made on purpose to save a few loading seconds, as the site will be particularly heavy. So I was lloking for small tricks like this one to make the loading look shorter.

So by doing this, if the user takes 5 or 6 seconds to choose the languages he wishes to use, it would be 5 or 6 seconds of less to load assets, and it will seem shorter to him.

But more generally than this situation, it happened in other projets to have such cases, when 2 asychronous event need to happen before to send a special notification. So I was looking for a generic solution to solve this problem, not so specific to this startup case.

Do you think it could be a good practice to create a special Proxy for this, to store wheter a notification was trigger by both actors, and which will trigger a notification once it is the case ?

Thanks a lot for your fast answer !


Ben
3  Announcements and General Discussion / Architecture / How to synchronize easily 2 notifications ? on: November 26, 2008, 04:10:27
Hi,

I often have to synchrnoize 2 asychronous notifications;

For instance, on application startup, I begin loading assets, and meanwhile, I display a small menu for the user to choose the appropriate language. (this is juste an example, as this situation happened in multiple situations, I look for a generic solution)

So I have to launch a command once all is finiched, but only when assets will be loaded AND user will have clicked, but I cannot predict which one of these actions will be done first.

Is there a good and easy practice to make this, for 2 or more notifications that have to be synchronized ? Thanks a lot !  :D
4  Announcements and General Discussion / Architecture / Re: Good practice to make custom classes extending a notification on: October 10, 2008, 07:45:29
Thanks a lot Cliff, I think you're totally right, I didn't think about all of these problems. So it brings much more problems than what it solves, but now at mise I know why I'll keep using the standard way of doing this, thanks a lot Cliff  :D !!!
5  Announcements and General Discussion / Architecture / Good practice to make custom classes extending a notification on: October 08, 2008, 09:21:40
Hi all,

I was wondering if extending the Notification class to make custom notifications is a good or a bad practice.

I sometimes would like to be sure of the kind of notifications I send and receive.

For example, let's say I have a LoginCommand calling a method in a Login proxy to get logged. Once logged, it would send a notification including a UserVO object containing information on the user retrieved from a database.

Wouldn't it be good to create a UserLoggedNotification class in this case, extending Notification, instead of a regular notification, just like we do in AS3 with custom Event classes?

Wouldn't it allow us to be sure that, for example if a mediator receives this notification, it expects the right type of notification body ? Because I find it quite disturbing that the notification body cannot be typed explicitely...

I hope you will understand my problem, thanks for your answer and sorry for my english mistakes !


Ben
Pages: [1]