I'm not saying Tools are a breach.

The point of the controller itself is to control the interaction
between the data and the rendering system (ie. view).  For the controller
code itself to put an object into the context which is only for rendering
purposes is a breach.  The controller control the interaction between view
and data.

Tools are part of the view layer.  I never said they weren't.  What i said
was that something like the following was a breach:


        context.put("alternator", alternator);
        context.put("data", data);

The point here is that alternator has nothing to do with the
data itself.  It is purely a view tool, and the controller shouldn't
be worrying about it.  It should be added to the view layer itself
(such as a Velocity tool).



-----Original Message-----
From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
Sent: Monday, May 03, 2004 11:28 AM
To: Velocity Developers List
Cc: 'Velocity Developers List'
Subject: Re: Foreach cycle


"Inger, Matthew" <[EMAIL PROTECTED]> wrote:
> Yes, the tool approach is very nice, and i would favor that.
> But explicitly adding to
> the context in my opinion is a breach of MVC, as the coloring
> is entirely a rendering issue.  It has nothing to do with the
> interaction of the data and the view, which is what the controller
> is responsible for.

By that logic, using velocity is a breach of MVC.
Just because the presentation layer is supported by code doesn't breach 
separation of presentation and control.  The tools are part of the 
presentation layer.

Tool usage can be completely under the control of the renderer.   You can 
use a tool or choose not to use a tool.  You can specify an alterate tool to

use by changing the toolbox.xml configuration file -- it's not necessary or 
desirable to load your tools from your control layer.

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to