What is a good method for loosely-coupled inter-controller communication in MVC/MVP?
For example, in a Quote, the user must create and add a new contact, or add an existing one.
They choose to create a new contact. When complete, the contact is added to the quote, and the UI returns the user to that quote. If they hit cancel, they are returned to the quote.
I want to re-use Contact elsewhere, thus it should not know anything about Quote. For example, if I create a contact from the contacts list, it should return there when done.
Here are some options that I have thought of:
ContactsController action calls ApplicationController.getNextStep(this) and the ApplicationController figures it out the next step on behalf of the ContactsController
ContactsController raises "actioncomplete" event or similar, and the ApplicationController is listening for this event, and calls the correct next step
QuoteController passes in a "baton" to ContactsController with the next step, which ContactsController calls when done
ContactsController raises "actioncomplete" event or similar, and the QuotesController is listening for this event, and calls the correct next step.
Do you have experience with these? Other ideas? Which will cause the fewest headaches in a big app?
Thanks!