You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Rafal Krzewski <Ra...@e-point.pl> on 2000/10/03 13:00:48 UTC
files extension - a radnom thought
Hello.
I noticed that the extension used for Velocity template files is .vm
As I undestand this is done so to suggest the relationship between
Velocity and WebMacro wm -> vm. In my opinion stressing this relationship
becomes less and less important as Velocity drifts away from it's
origin. We could use another name, that is prettier and more
meaningful. I propose the extension .vt It's more meaninguful
= Velocity template and it's also prettier in my opion. It resembles
a well known equation kinematics 'distance equals velocity times time'.
Feel free to flame if you find this a stupid idea :-)
Rafal
Re: files extension - a radnom thought
Posted by Tom Vaughan <to...@vaughan.to>.
"Rolf Veen" <ro...@helide.com> writes:
> Hi,
>
> > I noticed that the extension used for Velocity template files is .vm
> > As I undestand this is done so to suggest the relationship between
> > Velocity and WebMacro wm -> vm. In my opinion stressing this relationship
> > becomes less and less important as Velocity drifts away from it's
> > origin. We could use another name, that is prettier and more
> > meaningful. I propose the extension .vt It's more meaninguful
> > = Velocity template and it's also prettier in my opion. It resembles
> > a well known equation kinematics 'distance equals velocity times time'.
> > Feel free to flame if you find this a stupid idea :-)
> >
> > Rafal
> >
>
> Just another idea. In our template engine we use standard extensions (*.htm,
> *.txt, *.xml) so that the engine can return the corresponding MIME type. The
> focus is on the base language (text / HTML / XML ...), not on the template
> language. That is very usefull, at least in our case: we can return a
> text/plain document for example. Mapping is done by putting templates in
> specific directories. This is not incompatible with a specific file
> extension; just put the right mapping in web.xml.
Or something like:
$template.setContentType("text/html");
?
-Tom
>
> I've been lurking at various Apache projects, and found Velocity. Our own
> template engine will be also open source (but be patient). For the curious,
> there is a very short introduction at
> http://www.helide.com/htm/g-intro2.htm. My opinion is that there are too
> many template engines, and many of them will not survive; that's wy i'm here
> (just lurking for now): we need a standard, and that certainly could emerge
> from the Apache community.
>
> Regards.
> Rolf.
>
>
>
>
>
>
>
>
--
Tom Vaughan <tom at vaughan dot to>
Re: files extension - a radnom thought
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Fedor Karpelevitch wrote:
>
>
> Anyway I do not think this is something we need to worry about. Velocity
> can process templates with any extension so it's up to everyone how to
> name them and either way is legal. As for Velocity's own extension I am
> pretty happy with both .vm and .vt, what about .vel btw?
or .vtl
--
Geir Magnusson Jr. geirm@optonline.com
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."
Re: files extension - a radnom thought
Posted by Fedor Karpelevitch <fe...@home.com>.
Jon Stevens wrote:
>
> on 10/3/2000 7:55 AM, "Rolf Veen" <ro...@helide.com> wrote:
>
> > Just another idea. In our template engine we use standard extensions (*.htm,
> > *.txt, *.xml) so that the engine can return the corresponding MIME type. The
> > focus is on the base language (text / HTML / XML ...), not on the template
> > language. That is very usefull, at least in our case: we can return a
> > text/plain document for example. Mapping is done by putting templates in
> > specific directories. This is not incompatible with a specific file
> > extension; just put the right mapping in web.xml.
>
> That doesn't make a lot of sense here in this case given that mime type is
> not determined by the server, it is defined by the application. For example,
> a .vt/.vm/.wm file could easily return *anything* that falls under any mime
> type.
>
> I also have a problem with this because if we ever have an IDE for Velocity,
> then in a GUI environment I want my users to be able to double click on the
> file and have it open in the IDE.
Since velocity is a template language in most cases it is secondary to
the "host" language.
And it makes much more sense to me to edit vel templates for HTML files
in HTML editor, templates for Java sources in java editor and sql
templates in sql editor so I get the proper highlighting etc. Amount of
velocity code itself is usually relatively small.
> I also have a problem with this because I don't like the idea of overloading
> suffix based mime types. A .vt/.vm/.wm file is NOT a .html file even if it
> only returns .html after having been processed. Another example of this is
> that you don't have a .xml as a .html file.
the difference here is that xml is not a template. You should be rather
taking XSL as an example in this case...
>
> So, I vote -1 on the above
> and I vote +1 on changing it to .vt AFTER an
> analysis is done of any other suffixes that match .vt. I don't want to run
> into the WebMacro problem of .wm == Windows Media Format...LOL.
;-)
Anyway I do not think this is something we need to worry about. Velocity
can process templates with any extension so it's up to everyone how to
name them and either way is legal. As for Velocity's own extension I am
pretty happy with both .vm and .vt, what about .vel btw?
fedor.
Re: files extension - a radnom thought
Posted by Frank Conradie <fr...@opticode.co.za>.
----- Original Message -----
From: "Jon Stevens" <jo...@latchkey.com>
To: <ve...@jakarta.apache.org>
Sent: Tuesday, October 03, 2000 8:50 PM
Subject: Re: files extension - a radnom thought
> on 10/3/2000 7:55 AM, "Rolf Veen" <ro...@helide.com> wrote:
>
> > Just another idea. In our template engine we use standard extensions
(*.htm,
> > *.txt, *.xml) so that the engine can return the corresponding MIME type.
The
> > focus is on the base language (text / HTML / XML ...), not on the
template
> > language. That is very usefull, at least in our case: we can return a
> > text/plain document for example. Mapping is done by putting templates in
> > specific directories. This is not incompatible with a specific file
> > extension; just put the right mapping in web.xml.
>
> That doesn't make a lot of sense here in this case given that mime type is
> not determined by the server, it is defined by the application. For
example,
> a .vt/.vm/.wm file could easily return *anything* that falls under any
mime
> type.
>
> I also have a problem with this because if we ever have an IDE for
Velocity,
> then in a GUI environment I want my users to be able to double click on
the
> file and have it open in the IDE.
>
> I also have a problem with this because I don't like the idea of
overloading
> suffix based mime types. A .vt/.vm/.wm file is NOT a .html file even if it
> only returns .html after having been processed. Another example of this is
> that you don't have a .xml as a .html file.
>
> So, I vote -1 on the above and I vote +1 on changing it to .vt AFTER an
> analysis is done of any other suffixes that match .vt. I don't want to run
> into the WebMacro problem of .wm == Windows Media Format...LOL.
Hear hear! Very soon Microsoft will use up all available extensions ;-)
Frank
Re: files extension - a radnom thought
Posted by Jon Stevens <jo...@latchkey.com>.
on 10/3/2000 7:55 AM, "Rolf Veen" <ro...@helide.com> wrote:
> Just another idea. In our template engine we use standard extensions (*.htm,
> *.txt, *.xml) so that the engine can return the corresponding MIME type. The
> focus is on the base language (text / HTML / XML ...), not on the template
> language. That is very usefull, at least in our case: we can return a
> text/plain document for example. Mapping is done by putting templates in
> specific directories. This is not incompatible with a specific file
> extension; just put the right mapping in web.xml.
That doesn't make a lot of sense here in this case given that mime type is
not determined by the server, it is defined by the application. For example,
a .vt/.vm/.wm file could easily return *anything* that falls under any mime
type.
I also have a problem with this because if we ever have an IDE for Velocity,
then in a GUI environment I want my users to be able to double click on the
file and have it open in the IDE.
I also have a problem with this because I don't like the idea of overloading
suffix based mime types. A .vt/.vm/.wm file is NOT a .html file even if it
only returns .html after having been processed. Another example of this is
that you don't have a .xml as a .html file.
So, I vote -1 on the above and I vote +1 on changing it to .vt AFTER an
analysis is done of any other suffixes that match .vt. I don't want to run
into the WebMacro problem of .wm == Windows Media Format...LOL.
-jon
--
http://scarab.tigris.org/ | http://noodle.tigris.org/
http://java.apache.org/ | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/ | http://www.sourcexchange.com/
RE: files extension - a radnom thought
Posted by Rolf Veen <ro...@helide.com>.
Hi,
> I noticed that the extension used for Velocity template files is .vm
> As I undestand this is done so to suggest the relationship between
> Velocity and WebMacro wm -> vm. In my opinion stressing this relationship
> becomes less and less important as Velocity drifts away from it's
> origin. We could use another name, that is prettier and more
> meaningful. I propose the extension .vt It's more meaninguful
> = Velocity template and it's also prettier in my opion. It resembles
> a well known equation kinematics 'distance equals velocity times time'.
> Feel free to flame if you find this a stupid idea :-)
>
> Rafal
>
Just another idea. In our template engine we use standard extensions (*.htm,
*.txt, *.xml) so that the engine can return the corresponding MIME type. The
focus is on the base language (text / HTML / XML ...), not on the template
language. That is very usefull, at least in our case: we can return a
text/plain document for example. Mapping is done by putting templates in
specific directories. This is not incompatible with a specific file
extension; just put the right mapping in web.xml.
I've been lurking at various Apache projects, and found Velocity. Our own
template engine will be also open source (but be patient). For the curious,
there is a very short introduction at
http://www.helide.com/htm/g-intro2.htm. My opinion is that there are too
many template engines, and many of them will not survive; that's wy i'm here
(just lurking for now): we need a standard, and that certainly could emerge
from the Apache community.
Regards.
Rolf.