psyflex
|
|
« on: June 23, 2010, 01:34:38 » |
|
Hello Everyone,
I want to begin with mentioning that the PureMVC is awesome!!
A quick verification:
Is it ok to group related commands into one command, and call this command with different types to execute different sub-commands ?
An example:
I have a CreateProductsView, it has SUBMIT and INIT commands (usually there is more in my app),
I create a main Command called: "CreateProductsCommand" link it with "EXECUTE_CREATE_PRODUCTS_COMMAND" notification, and call that notification with type "INIT".
This way I can save the amount of command classes and notifications, and create a "mini controller" to that view, where if you want to look or changed anything, it is all under the same place (only in case other places doesn't need to use the same code of course)
Is it good practice? are there better ways?
Thanks, Shai
|