What led to this code..
1. The cairngorm draw back of a failure to communicate from the command to the view.
2. The non ability to track an event after dispatch which is very essential.
A extremely detailed analysis is available courtesy Jess.
A small review of the code... (details available at joe's Blog)...
From the command one can send results or intimate the view that a particular event has completed or faultered.
So we dispatch an cairngorm event from the command. This is controlled by viewcontroller a sort of frontcontroller and another || sort of command which handles the event.
Now in the view we are listening to this event so as soon as this event occurs the functions are performed.
This introduces a lot of flexibility in the view and the command is reusable and it gets into the true code reuse formula...
No comments:
Post a Comment