velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Sidler <>
Subject Re: [Veltools] ToolboxManager (round 4 :-)
Date Fri, 03 May 2002 14:19:19 GMT
Geir Magnusson Jr. wrote:

> On 5/2/02 5:17 PM, "Gabriel Sidler" <> wrote:
>>Geir Magnusson Jr. wrote:
>>>On 5/2/02 4:45 PM, "Gabriel Sidler" <> wrote:
>>>>I finally got around to study your latest proposal regarding the tool
>>>>management. Overall I like the approach and think it is a good basis
>>>>to move on.
>>>>I'd like to make a few remarks/suggestions:
>>>>- Your proposed DTD for the toolbox configuration makes good sense
>>>>to me. The minor exception is that the 'scope' element seems to be
>>>>missing. Or, am I missing something?
>>>What does scope mean in a toolbox?
>>Defines the life cycle of a tool. Values are 'request', 'session' and
> I have no idea what that means outside of Servlet-land.

First of all, scope is and has been misleading in this context. I am
not sure if 'life span' or 'life cycle' of a tool would be more clear.

My view is this: As soon as you process more than one template within an
application, you are confronted with the design decision how to handle
the instantiation of view tools. Are you creating one tool instance and
reuse it for all templates OR are you recreating tool instances for every
template that is being processed? The answer to that question is influenced
by aspects like performance, thread safety of tools, implementation effort
required, etc.
In that sense, the concept of scope/life span/life cycle can be seen as
applicable not only to the servlet environment but to virtually any
environment where Velocity templates are being processed. In some environments
the life span of tools is hard-coded (e.g. DVSL), in others its configurable
(e.g. VelocityViewServlet).

I agree that these are somewhat theoretical considerations, but since
we are working on a library of reusalble view tools I think it is
helpful to try to generalize the involved concepts.


Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message