Re: Design Question for Model and View
- From: Jason Cavett <jason.cavett@xxxxxxxxx>
- Date: 31 May 2007 07:30:23 -0700
On May 30, 6:08 pm, Lew <l...@xxxxxxxxxxxxxxxxxxxx> wrote:
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
Okay - this is primarily what I was wondering. The client/server (or
initiator/responder) model seems a lot less complex as opposed to pure
MVC.
Thanks
.
- Follow-Ups:
- Re: Design Question for Model and View
- From: Lew
- 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
- Re: Design Question for Model and View
- From: Lew
- Design Question for Model and View
- Prev by Date: Re: JARs and Manifest
- Next by Date: Re: Design Question for Model and View
- Previous by thread: Re: Design Question for Model and View
- Next by thread: Re: Design Question for Model and View
- Index(es):
Relevant Pages
|