This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
That doesn't sound like a normal object-oriented scenario.
Foo calls Bar, which passes control back to Foo. That's it. If Bar wants to pass control elsewhere it can call Rab, but control will pass back. A method can't decide which method calls it, and a called method can't decide what its calling method does afterwards.
You can try things like throwing Exceptions, but that is a very poor bit of design.
Joined: Apr 02, 2008
That doesn't sound like a normal object-oriented scenario
in Model-view-controller.First request goes to Controller then controller only invoke respective business classes ,control come back to controller then it invoke the view to display the result.so the controller play a core role in this .all load exist in controller .
I think that it is violation clear separation.service layer's(model) flow is controlled by controller.
instead of control hold flow control for through out the process,it just pass the control to its next entity for further processing.model only decide when to go back to controller.
I didn't quite understand your second post, jacob, but based on just your first post, I'd suggest you look at the Command pattern. In the command pattern, objects are used to represent work to do. Your code can request work by creating a Command and putting it into a queue of Commands to be executed. After your code registers a command, it can return, or do other work; the command will eventually be executed by the command queue.