Re: Model View Controller - please clarify

hugo.elias_at_virgin.net
Date: 01/28/05


Date: 28 Jan 2005 10:41:38 -0800

Yes, I do realise that that's one of the benefits of MVC, so, for
example, I could print the shapes to paper, rather than rendering them
to the screen.

But even in this case, I think the same question applies. Surely, if
the application is divided this way, then changes to the model have to
affect the view and the controller also?

Integrating the rendering code into the model still lets me have
multiple views of the model at the same time. For example I could just
tell my models to render themselves to different places:

Shape.Render(dc1, RenderSettings1);
Shape.Render(dc2, RenderSettings2);

It seems to me that MVC depends how much is likely to change. If the
model (code) changes often, and new Shapes appear and require different
access functions, requiring constant updates to the view (code), then
it hardly seems worth having separate M,V,C.

But if you can have a totally consistent set of member functions for
all the Shapes, then no changes are ever needed to the view, and the
MVC concept does help.

I can see both sides of the argument. Two sensible ways of dividing
the application are pulling in different directions. Is there anyone
who has encountered a problem like this, and can shed any light?

Many thanks again, and sorry for the slightly OT posting. I'll aim
for comp.object next time.

    Hugo Elias



Relevant Pages

  • Rendering CAD/GIS Data on a Map Canvas
    ... I haven't decided for sure if I will use Swing or SWT for the ... This program I am working on will have to display a large number of 2D ... possible to render the shapes that would fall within an area 20% larger ... Is this method of partial rendering possible? ...
    (comp.lang.java.gui)
  • Re: [somewhat OT] Re: Model View Controller - please clarify
    ... >>It seems to me that MVC depends how much is likely to change. ... and new Shapes appear and require different ... > handled by a class that's appropriate to the platform. ... That controller class uses a pointer to the window ...
    (comp.lang.cpp)
  • Re: Drawing discontinuities doubt
    ... although they felt your assertion was correct, ... "Rendering Of 3-D Shapes", the equations seemed rather trivial and, ...
    (comp.graphics.algorithms)