on 8/7/2000 5:07 PM, "John McNally" <[EMAIL PROTECTED]> wrote:
> I have been working on generalizing the template framework, which currently
> is implemented separately for FreeMarker and WebMacro. I am hoping to use
> it in a JSP system as well. There are a few issues I suppose need voted on.
>
> When cycling through the possible matches for a Screen module to a screen
> template, etc., I am using a File.exists() check instead of the template
> engines' specific getTemplate type call. I do not think this should be much
> slower, especially since it should be a one time deal (in production.)
-1. This doesn't provide a way to do caching.
> This
> requires a template.path property in TurbineResources. This is already
> needed for FreeMarker, but it would be duplicating information for WebMacro
> in WebMacro.properties.
I thought that we made changes to the WM stuff to allow it to find the path
to the templates in the TR.properties file instead of the WM.properties
file.
> I would really like to make this an optional
> property, so that if it is not given, the default would be the /templates
> directory under your webapp directory. Then the property would only exist
> in TurbineResources for non-standard setups or legacy servlet engines.
It would be WEB-INF/templates. That is fine.
> This requires the service to have information regarding the servlet context.
> It is simple to do and has been requested before, I believe, with regard to
> not having to specify an absolute path in WebMacro.properties as
> well. A Service.init(Object) or more specific Service.init(ServletConfig)
> can solve this. I propose that there continue to be a no arg init() as
> well. Service will have one more method as well, requiresServlet().
If you are going to do this, make sure to go back and read the archives
regarding the stuff that Kevin was supposed to do. Either implement that or
bug Kevin to do it. :-)
> TurbineServices.getService(String) then calls requiresServlet() to determine
> whether to init with init() or init(Object). Turbine supplies its
> ServletConfig to TurbineServices when it loads. If a service is called
> which requires the servlet prior to the servlet initialization,
> TurbineServices will throw an Exception.
I don't like the name requiresServlet()...that doesn't really describe what
is going on.
Also, you should be able to always init(Object) and simply just pass in a
null instead of checking a method.
Also, I would prefer a defined interface instead of Object.
-jon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]