After posting I kept reading the forum looking for info on this subject and I ended up looking at the sea of arrows source, and the NavigationVO.
By re-reading my other post it sounds as if a Mediator would send an URL, which isn't a wise decision as you've already showed.
Anyways, I am actually implementing some type of NavigationVO.
The inconvenience I have found is the following:
How could I map Mediators to specific URLs, or better said, a NavigationVO.
Should there be a centralized place where every NavigationVO is received and consecuently forward to a concrete Mediator?
Should every mediator listen for NavigationVO's and decide on their own if they should use it or ignore it?
I like the idea of an URL-to-Mediator mapping Proxy.
Lets say we can call a method on this Proxy and map an URL (string) to a concrete Mediator. We would use Mediator.NAME to reference the Mediator.
When a NavigationVO is received by some type of NavigationMediator, it would consult the Proxy to unmap the url and return a Mediator. In consecuence, notify that mediator of the Navigation request.
The mapping would be one to one, or one to many. The same URL could be mapped to many mediators.
I this this woudl be useful in situations where the app is a site, and the URL not only represents the site's sections, but possibly some type of subsection, or product.
For example:
www.mysite.com/#/catalog/category/product/This NavigationVO would trigger a section change (if not already in section catalog). And it could also trigger the product info and image loading process started by a ProductViewerMediator.
I'm constantly implementing this type of navigation lately and I'm thinking of building some type of utility which I can re use. Any suggestions?