PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: andrew on August 13, 2008, 02:55:35



Title: Chaining IResponders by adding multiple of them with asychToken.addResponder()
Post by: andrew 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?


Title: Re: Chaining IResponders by adding multiple of them with asychToken.addResponder()
Post by: puremvc 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>