Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Chaining IResponders by adding multiple of them with asychToken.addResponder()  (Read 7983 times)
andrew
Newbie
*
Posts: 6


View Profile Email
« on: August 13, 2008, 02:55:35 »

For any remote call (which is how all real work is done in our app) there are two types of things that need to happen:
- Domain logic: updating the model and other stuff related to the domain / data
- View logic: displaying messages and showing and hiding progress indicators etc. 

I was thinking of having a responder to handle the Domain logic, and one for view logic.  Both basically need to know what happened in any remote call.  So I chain them such that the View (pureMVC Mediator) asks the Domain Model (pureMVC Proxy) to do some domain logic.  In the low level remote service call code we add these two responders with the Domain Responder first.  Then the call happens, and it should fire the domain responder then the view responder.  Either one could send notifications or whatever if there are other interested parties. 

So questions are:
- Is this a horrible idea? 
- Is it not very PureMVC?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 14, 2008, 06:42:59 »

Not very PureMVC in that it involves the View directly in the response.it would be better to have the proxy respond, updating its data or whatever, then notify the View.

-=Cliff>
Logged
Pages: [1]
Print