Snippage.
> > I obviously don't want to put view logic in the subclass though that would
> > mean it could polymorphically deliver what is required.
> You don't have to put the view logic in model subclass hierarchy, but
> there's nothing wrong with having the *selection* of a particular view
> interface in the model subclass hierarchy.
There is in MVC, the model should have no knowledge of any view, the view is
client to the model.
This is the situation I have.
--
Mike W
John C. Bollinger - 07 Jan 2006 03:06 GMT
>>You don't have to put the view logic in model subclass hierarchy, but
>>there's nothing wrong with having the *selection* of a particular view
[quoted text clipped - 3 lines]
> client to the model.
> This is the situation I have.
I think you're looking at a job for the (C)ontroller part of your MVC
application. When the controller triggers the polymorphic task, it
should also set up the view appropriately for displaying the result.
Presumably it has enough information to do so. (If it doesn't, then you
probably haven't separated the model, view, and controller roles
rigorously enough.)
Your original post also touched on a question of the structure of the
view layer, which I think is quite distinct from the issue of where the
logic should go. You may not need a hierarchy of view components
mirroring your model hierarchy, but it is difficult to give concrete
recommendations for so abstract a problem. The main alternative to a
hierarchy of view classes would be one or a small number of view classes
that are sufficiently configurable to handle the view requirements of
all the model classes you have or can conceive. I don't know how this
might mesh with your requirements.

Signature
John Bollinger
jobollin@indiana.edu
iamfractal@hotmail.com - 08 Jan 2006 18:42 GMT
Snippet.
> There is in MVC, the model should have no knowledge of any view, the view is
> client to the model.
> This is the situation I have.
>
> --
> Mike W
Actually, you probably know more about MVC than I do, but just for the
record, when I'm MVCing (which perhaps in a purist sense, I don't) I
tend to re-interpret your line above as, "... the model should have no
knowledge of any view *implementation* ..." I do allow my models to
poke at the View *interface* whenever it's
(Productivity/Punctuality/Quality) cheapest.
.ed
--
www.EdmundKirwan.com - Home of The Fractal Class Composition
Chris Smith - 10 Jan 2006 05:04 GMT
> Actually, you probably know more about MVC than I do, but just for the
> record, when I'm MVCing (which perhaps in a purist sense, I don't)
Correct. That's not the classical MVC pattern. You would avoid
confusion by referring to it as "modified MVC" or "pseudo-MVC" or some
such thing.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
iamfractal@hotmail.com - 09 Jan 2006 01:52 GMT
Snwip.
> There is in MVC, the model should have no knowledge of any view, the view is
> client to the model.
> This is the situation I have.
>
> --
> Mike W
Actually, you probably know more about MVC than I do, but just for the
record, when I'm MVCing (which perhaps in a purist sense, I don't) I
tend to re-interpret your line above as, "... the model should have no
knowledge of any view *implementation* ..." I do allow my models to
poke at the View *interface* whenever it's
(Productivity/Punctuality/Quality) cheapest.
.ed
--
www.EdmundKirwan.com - Home of The Fractal Class Composition
iamfractal@hotmail.com - 09 Jan 2006 03:49 GMT
(This crashed during first post - apologies if now double-posted.)
Snwip.
> There is in MVC, the model should have no knowledge of any view, the view is
> client to the model.
> This is the situation I have.
>
> --
> Mike W
Actually, you probably know more about MVC than I do, but just for the
record, when I'm MVCing (which perhaps in a purist sense, I don't) I
tend to re-interpret your line above as, "... the model should have no
knowledge of any view *implementation* ..." I do allow my models to
poke at the View *interface* whenever it's
(Productivity/Punctuality/Quality) expedient.
.ed
--
www.EdmundKirwan.com - Home of The Fractal Class Composition