I am currently working on a pet project (for practice) where I would like to add transitions between content. The idea is to have some sort of slide animation where the old content moves together with the new content away. Only I am having trouble how I could make this transition with PureMVC. At least what would be best way to do it.
Currently, I am having multiple mediators for like the header, navigation menu, background and the content mediator. At the moment when the content mediator receives a UPDATE_CONTENT notification a property will be set on the view component. The view component then creates the appropriate view associated with the content-type. At the moment I am considering to move away from one big content mediator but create sub-mediators for the different content types and it's views. But first I am having issues with the above mentioned animation how to implement it.
Currently I am having a having a event listener for a NavigateEvent which handles the switching of content basically added to the contentmediator's view component. The event handler of this event will then send a notification with OPEN_CONTENT which then cause the OpenContentCommand to be executes which updates the SiteProxy which looks up the content vo for the given unique name (as passed by via the NavigateEvent) and then sets the currentContent-property of this SiteProxy. The property setter then issues the sendNotification( NoteName.UPDATE_CONTENT ) command.
But maybe I am doing it totally wrong? Anyone having suggestions? Should I move to separate mediators for the different content types? How would implement such a slide animation when the application should support different content types (e.g. a page, a image, a form or popup dialog).
Thanks!