On Fri, Jun 02, 2000 at 04:50:01PM -0500, dave bryson wrote:
> On Thu, 01 Jun 2000, you wrote:
> > How about lines in TurbineResources.properties like:
> >
> > webmacro.context.page = org.apache.turbine.util.webmacro.WebMacroPageAttributes
> > webmacro.context.formatter = org.apache.turbine.util.webmacro.WebMacroFormatter
>
> I think this could run into a problem if the number of tools grow ( an
> entry for each ).
I don't see the problem. My plan is to read the property file entries on
the first request and then cache the Class objects in a vector. Then
creating the tools just involves iterating through the vector.
> What about taking an approach similiar to the way
> WebMacro loads all of it's ContextTools ( see the WM properties ).
Yeah - I did think about this but there is a particular naming scheme
for ContextTools (the class gets put in the context as the class name
minus the 'Tool' suffix). Our current tools don't match this, and I
thought it would be nice not to have to.
> Hey, maybe even _use_ the WebMacro.properties file for this stuff?
Hmmm... we're mainly talking about Turbine specific tools though (this
is configuration of the *Turbine*WebMacroService.
> > Where the class can implement TurbineWebMacroTool
> I think this is a good idea. We should then convert all our current
> utils/tools to implment this interface.
Yep - I was going to do that as part of the work, it'll be pretty
trivial.
> > (I'm not sure about TurbineWebMacroTool as a name for
> the interface - it seems like the interface might have more general uses? Any
>ideas?)
>
> How about TurbineWebMacroContextTool ?
Looking at Stephen's naming comments reminded me what niggled about the
name - its not an adjective and also its more specific than it needs to
be. What about 'RunDataSettable' - it's not particularly pretty but it's
simple, clean, and describes exactly what it does.
Another problem with TurbineWebMacro[Context]Tool is that it implies
that a class _should_ implement that to get put in the context, but I
had in mind that that wouldn't be necessary. If the class doesn't need a
RunData object (like WebMacroFormatter) then it just doesn't implement
the interface.
> And also, good work on the $page.... stuff!
Thanks!
--
Sean Legassick
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]