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 / Getting Started / Questions about proxies on: May 11, 2010, 01:58:48
Hello, im starting to use pureMVC, and i come with two questions about the usage of the proxies:

1. In the "Best practices" document, it says that we should use the ApplicationFacade class to declare all the constants for the notifications names, or use an external class, but i've seen that the notifications names that are going to be send by the proxies are defined within themselves(the proxies), so, should we declare the names on ApplicationFacade/External classes, proxies or a mixture between both?

2. I'm working on a video game, and i have some data, like score, shipSpeed, lives, etc. I have a VO called GameDataVO, that holds this data and provides public setters and getters for maniputing it. I did a proxy that provides the same setters and getters, and i want to send notifications from the proxy whenever the data changes. Now, my question is, should i send a diferent notification for each property changed? i mean, something like SCORE_CHANGED, LIVES_CHANGED, SHIP_SPEED_CHANGED and pass as the body each piece of data? or should i send a general notification GAME_DATA_CHANGED, a VO with the data as a body, and use the type property to specify the type of data changed? or there is another better way?

Thanks in advance

David
Pages: [1]