Jon,

To me, this is just a higher abstraction of the Pull vs. Push MVC Model
that was authored by you in Turbine
(http://jakarta.apache.org/turbine/turbine-2/pullmodel.html). It gives
the Java developer control to say which tools are safe for template
designers to use (pull) into any pages that the tool loader tool is
available in the context. If you don't want them to pull any tools,
don't put the tool loader tool into the context. If you want three tools
to be pulled (format, math, myCustomTool), place those into the map,
include the tool loader tool in the context and allow the template
designers to pull out the tools they need for the templates they work
design.

I just didn't feel that the "approved" tools (if any) should be
constructed until they are really used for a specific template and the
template designer should know them by a "common" name, not a class name.
"Lazy" construction of the tools just allows for improved performance
for templates that don't use any/all of them.

Of course, there could be further evolution of this to allow Java
developers to declare "global" tools and template-specific tools. I
think this is what the Views sub-project in velocity-tools is trying to
do (still learning here so I may be wrong). I'm just looking for higher
abstractions to "declare" the tool availability vs. coding. Eventually,
it would be nice to have the ability to declare something like the
following that the central template engine would use to prepare the
context prior to merging them:

*.vm:           formatTool, myCustomTool
orderForm.vm:   mathTool
home.vm:        newsTool

There so much out here, that this may exist already and I just haven't
come upon it yet. Having tools (and tools for tools) be flexible for the
many various projects that exist in the world is a great challenge.
Every one doesn't wear the same size or style of shoe and some go
barefoot! 

I'm learning, listening and contributing.

bill

-----Original Message-----
From: Jon Scott Stevens [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 18, 2002 10:34 PM
To: velocity-dev
Subject: Re: ToolLoader tool

I honestly believe that tools should not be loaded within VTL. It isn't
MVC.
Velocity is the VIEW and you are confusing the MC by creating this.

The framework which handles the MC should be responsible for loading
tools
and making them available in the context (as well as controlling the
scope
of the tools).

But, I'm sure that none of you will listen to me. So do whatever you
want.

-jon


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




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

Reply via email to