Nathan Bubna wrote:

> Gabe said:
> ...
> 
>>I'd like to suggest that these tools also implement the
>>ContextTool interface. See also my next mail regarding
>>changes to the ContextTool interface.
>>
> 
> i was wondering if someone would suggest that... :)
> 
> it is an idea i considered briefly, but decided against for several reasons.
> for one, MathTool is completely static, there is no point or benefit to
> implementing ContextTool or any other tool interface.   


Exactly in the case of an all static tool it is important to give
the tool manager a hint that it does not need to recreate instances
for each request. So, the proposed isStatic() method would allow a
smart tool manager to use one instance for the entire runtime.
How else do you distinguish between all static tools and non-static tools?


> but the main problem
> i have with implementing ContextTool is that i do not use these tools solely
> with the VelocityViewServlet.  


Actually, the ContextTool interface is not desiged to be used with
VelocityViewServlet only. It should be useful in any circumstance
where you work with Velocity and tools. For example, I am thinking
about DVSL.

> in fact, they were originally written to be
> used in a Turbine/Velocity web app and are still primarily used there.  so I
> don't think there is any benefit to tying these tools to the view servlet.


As said, the interface shouldn't tie the tools to the VelocityViewServlet
at all. If the current draft does, we should change it to achive this goal.


> my opinion of the ContextTool interface is that it is that it should be used
> *only* when necessary. otherwise, tools should remain as generic as
> possible so they can be easily used in a variety of different settings.


I completely agree with this statement. That's how I see it used. To be
followed up after I see your feedback to the proposal I just sent.

Gabe


--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


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

Reply via email to