Re: Design Question for Model and View
- From: Lew <lew@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 May 2007 18:08:14 -0400
Kai Schwebke wrote:
By shifting the control to the view[,] the flags and callbacks
can be avoided in this case.
This is a very good principle to enforce between two components - distinguish the initiator ("client") from the responder ("server"), in your case the view and the model, respectively.
The responder should not initiate, thus the initiator need never respond.
The initiator asks the responder if it's "saved". Based on the answer, the initiator might solicit information from the user. Based on that answer, the initiator might ask the responder to save the data. After all that, the initiator asks the responder to close (something).
This pattern avoids a lot of deadlock and complexity, and has surprisingly wide applicability.
--
Lew
.
- Follow-Ups:
- Re: Design Question for Model and View
- From: Jason Cavett
- Re: Design Question for Model and View
- References:
- Design Question for Model and View
- From: Jason Cavett
- Re: Design Question for Model and View
- From: Kai Schwebke
- Design Question for Model and View
- Prev by Date: Re: How to call rsh from Applet to remote host
- Next by Date: lightweight soap calls
- Previous by thread: Re: Design Question for Model and View
- Next by thread: Re: Design Question for Model and View
- Index(es):
Relevant Pages
|