Others like the ending *.vtl ;)

"vm" was historically interited by when taking over the original "wm"
(WebMacro -> VelocityMacro). Velocity template "vtl" seems more proper.


Claude Brisson wrote:
It seems that in all the docs and samples, the choosen policy is to call
the template files foo.vm, not including in the filename any information
about the targeted mime type. But I think this is a bad practice and
I've always preferred different policies, like "foo.js.vm".

Yes, this looks good - but beware, I've seen some systems (like mozilla
on Win) when downloading files with several dots in the name, convert
all but last dot to undescores (like filenames with version numbers).
OK, this is not a problem for Vel templates, since these are typically
rendered and not downloaded...


There is a related topic which is the url resolution process: by
overloading the servlet.getTemplate() method, you can for instance have
urls of the form /foo.js : getTemplace() first tries to get a foo.js and
then foo.js.vm, or the contrary).

This is resource loader issue, which would be an application issue...


Survey: Which convention do you use? And do you think we should change
the docs so that newcomers get good habits?

What in the docs do you mean:
- The names like foo.vm?
- The naming convention *.vm or *.vtl ?
- examples containing things like JavaScript? (are there doc examples on this?)

Please note that you would then also need things like:
  foo.js.vtl
  bar.html.vtl
  baz.css.vtl
  bax.xml.vtl
etc.

I believe it is up to the application designer to do recommendations
on file naming.


If you agree I'll create a bug report about it.

--
Claude

:) Christoph

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

Reply via email to