Re: MVC Paradigm
Re: MVC Paradigm
- Subject: Re: MVC Paradigm
- From: Ondra Cada <email@hidden>
- Date: Sun, 26 Sep 2004 00:59:11 +0200
Ahhh... I would beg to differ somewhat.
In my interpretation of MVC...
On 26.9.2004, at 0:41, James Bucanek wrote:
(B) View: A bunch of buttons and text fields that display data and
send
command requests to the Controller. I only have one view right now to
make things simple. Such commands include
(1) Add record
(2) Remove record
(3) Set record
"A bunch of buttons" would be part of your control objects.
... buttons are part of view as well, since ...
Model objects "hold". View objects "show". Control objects "do".
... Views show both data *and* (the graphical rendering of) commands.
Examples of "commands" in this sense are buttons, menus, steppers, and
so forth.
Controllers provide the data -- they contain data sources and outlets
for that purpose -- and perform the commands: they contain actions for
that purpose. Generally said, of course.
IMO, the original James' design was quite right. Presumed we for a
moment forget it is possible to subclass, instantiate, and bind in IB,
it could be -- as a rude simplification, of course -- said that
- view is what you do in Interface Builder;
- model is the code which represents the data and their behaviour;
- controller is the boring legwork you have to do so that the two work
together.
In practice of course Interface Builder always allowed to do at least
part of the controller stuff, and now with bindings it allows to do a
considerable part of it (with very simple applications sometimes even
all).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden