You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Jon Stevens <jo...@latchkey.com> on 2000/08/25 18:52:52 UTC

[ANN] Apache Velocity

The Jakarta Project is proud to announce:

    Apache Velocity
    <http://jakarta.apache.org/velocity/>

Apache Velocity is a clean room implementation of the Java based template
engine WebMacro (WM) <http://www.webmacro.org/>. Velocity is available under
the non-restrictive Apache Software Foundation license. It has been
developed over the last three weeks primarily by Jason van Zyl (Periapt)
with sideline help from Daniel Rall (CollabNet) and Jon S. Stevens
(CollabNet).

WM and Velocity Differences

Velocity uses a grammar based parser generated by JavaCC (Java Compiler
Compiler) using the JJTree extension to create an Abstract Syntax Tree (AST)
which may subsequently be traversed (repeatedly if desired) by a tree
walker. The tree walker is implemented using the visitor design pattern.
This allows the parsing logic to be separated from the actions performed on
the resultant AST. For example there are two visitors that come with
Velocity: the first is a simple implementation that produces a visual tree
of the syntax and nothing more, mostly used for debugging; the second is the
visitor that actually generates output from user defined values and
introspection. 

The benefit of using a parser like this is that we have solved a
lot of the parsing issues that WebMacro has such as not being able to
properly handle JavaScript within the template without having to do a lot of
hacks to make it work as well as things like not having to escape $
characters. Other benefits include things like being able to report line
numbers as well as expected tokens on parser errors much like javac (which
also uses JavaCC) reports information when your Java code does not compile.
We also hope to be able to eventually produce compiled templates for both
speed and security reasons. We feel that by using a well established parser,
we can offer a more reliable and feature complete solution.

Velocity is available under the ASF license instead of the GPL and/or SPL
license. The Turbine <http://java.apache.org/turbine/> project currently
depends on WebMacro and thus cannot be distributed from the Apache.org
website as a released version because of the GPL and/or SPL license
restrictions. Velocity will become the default template engine for Turbine.

Velocity is available on a stable platform with full mailing list and
multiple developer support. In the past, we have had issues with WebMacro
CVS and mailing lists not being reliable as well as not having simple
features like CVS commit messages going to a mailing list. We feel that by
having Velocity available under a larger and more established collective
that we will be able to accomplish more.

Language differences between Velocity and WM are very small. In a lot of
cases, Velocity will be a drop in replacement for WM. We will provide
documentation for the differences between the two on the website soon.

Advantages of Velocity

For those of you who are looking for an alternative to JSP (JSP sucks!
<smile>) and other page template engines, Velocity offers several
advantages. The design of the simple template language enforces an MVC style
of development, it is impossible to embed Java code within your template.
This is possible to do with JSP, but is not the primary focus and is often
easily abused. 

Velocity is also a much smaller code base and simpler implementation. There
is no need to have a javac compiler installed to compile your templates into
bytecode. In fact, when we add compiled templates to Velocity, we will will
not require a javac compiler because we can write out bytecode ourselves.

Velocity is developed in a 100% open source fashion with all discussion and
development happening on public mailing lists. JSP is only 50% open as the
specifications are developed primarily behind closed doors in the Java
Community Process (JCP).

Velocity will be tightly integrated into the Turbine web application
framework and all direct WebMacro support will be removed in order to comply
with the license restrictions (it will be up to others to provide outside
support for WebMacro if they choose to continue using it). This framework
provides a large collection of very useful code for developing web
applications that has been donated by over 30 developers now. Code includes
an Object Relational abstraction package, database connection pools. If you
are developing a web application, definitely take a look at Turbine.
<http://java.apache.org/turbine/>

Like WebMacro, Velocity can be used for more than just websites and web
applications. The engine can be called anywhere in your Java code to process
the template files. For instance, it can be used as a template engine for
generating customized email messages with the help of the JavaMail API's.

Status of Velocity

It is around 70% complete. It supports most of the current set of language
rules that WebMacro does including most of its introspection features.
Documentation is still needed, although if you are familiar with WebMacro
you will be familiar with Velocity. It is missing template caching and the
ability to compile templates. We expect to have these features implemented
shortly. Other compatibility issues will also be resolved as quickly as
possible.

If you are interested in seeing (and helping!) the future of template
engines progress, then please subscribe to the mailing lists and contribute
to the project.

<http://jakarta.apache.org/velocity/>

thanks,

-The Velocity Team


Re: [Webmacro] [ANN] Apache Velocity

Posted by Justin Wells <ju...@semiotek.com>.
You can stop working on this now. I'd rather release WM under the Apache 
license, or the MPL, rather than see you fork it. Religion notwithstanding,
the SPL is already effectively an MPL style license. Not like this is a 
big change. 

Justin

On Fri, Aug 25, 2000 at 09:52:52AM -0700, Jon Stevens wrote:
> 
> The Jakarta Project is proud to announce:
> 
>     Apache Velocity
>     <http://jakarta.apache.org/velocity/>
> 
> Apache Velocity is a clean room implementation of the Java based template
> engine WebMacro (WM) <http://www.webmacro.org/>. Velocity is available under
> the non-restrictive Apache Software Foundation license. It has been
> developed over the last three weeks primarily by Jason van Zyl (Periapt)
> with sideline help from Daniel Rall (CollabNet) and Jon S. Stevens
> (CollabNet).
> 
> WM and Velocity Differences
> 
> Velocity uses a grammar based parser generated by JavaCC (Java Compiler
> Compiler) using the JJTree extension to create an Abstract Syntax Tree (AST)
> which may subsequently be traversed (repeatedly if desired) by a tree
> walker. The tree walker is implemented using the visitor design pattern.
> This allows the parsing logic to be separated from the actions performed on
> the resultant AST. For example there are two visitors that come with
> Velocity: the first is a simple implementation that produces a visual tree
> of the syntax and nothing more, mostly used for debugging; the second is the
> visitor that actually generates output from user defined values and
> introspection. 
> 
> The benefit of using a parser like this is that we have solved a
> lot of the parsing issues that WebMacro has such as not being able to
> properly handle JavaScript within the template without having to do a lot of
> hacks to make it work as well as things like not having to escape $
> characters. Other benefits include things like being able to report line
> numbers as well as expected tokens on parser errors much like javac (which
> also uses JavaCC) reports information when your Java code does not compile.
> We also hope to be able to eventually produce compiled templates for both
> speed and security reasons. We feel that by using a well established parser,
> we can offer a more reliable and feature complete solution.
> 
> Velocity is available under the ASF license instead of the GPL and/or SPL
> license. The Turbine <http://java.apache.org/turbine/> project currently
> depends on WebMacro and thus cannot be distributed from the Apache.org
> website as a released version because of the GPL and/or SPL license
> restrictions. Velocity will become the default template engine for Turbine.
> 
> Velocity is available on a stable platform with full mailing list and
> multiple developer support. In the past, we have had issues with WebMacro
> CVS and mailing lists not being reliable as well as not having simple
> features like CVS commit messages going to a mailing list. We feel that by
> having Velocity available under a larger and more established collective
> that we will be able to accomplish more.
> 
> Language differences between Velocity and WM are very small. In a lot of
> cases, Velocity will be a drop in replacement for WM. We will provide
> documentation for the differences between the two on the website soon.
> 
> Advantages of Velocity
> 
> For those of you who are looking for an alternative to JSP (JSP sucks!
> <smile>) and other page template engines, Velocity offers several
> advantages. The design of the simple template language enforces an MVC style
> of development, it is impossible to embed Java code within your template.
> This is possible to do with JSP, but is not the primary focus and is often
> easily abused. 
> 
> Velocity is also a much smaller code base and simpler implementation. There
> is no need to have a javac compiler installed to compile your templates into
> bytecode. In fact, when we add compiled templates to Velocity, we will will
> not require a javac compiler because we can write out bytecode ourselves.
> 
> Velocity is developed in a 100% open source fashion with all discussion and
> development happening on public mailing lists. JSP is only 50% open as the
> specifications are developed primarily behind closed doors in the Java
> Community Process (JCP).
> 
> Velocity will be tightly integrated into the Turbine web application
> framework and all direct WebMacro support will be removed in order to comply
> with the license restrictions (it will be up to others to provide outside
> support for WebMacro if they choose to continue using it). This framework
> provides a large collection of very useful code for developing web
> applications that has been donated by over 30 developers now. Code includes
> an Object Relational abstraction package, database connection pools. If you
> are developing a web application, definitely take a look at Turbine.
> <http://java.apache.org/turbine/>
> 
> Like WebMacro, Velocity can be used for more than just websites and web
> applications. The engine can be called anywhere in your Java code to process
> the template files. For instance, it can be used as a template engine for
> generating customized email messages with the help of the JavaMail API's.
> 
> Status of Velocity
> 
> It is around 70% complete. It supports most of the current set of language
> rules that WebMacro does including most of its introspection features.
> Documentation is still needed, although if you are familiar with WebMacro
> you will be familiar with Velocity. It is missing template caching and the
> ability to compile templates. We expect to have these features implemented
> shortly. Other compatibility issues will also be resolved as quickly as
> possible.
> 
> If you are interested in seeing (and helping!) the future of template
> engines progress, then please subscribe to the mailing lists and contribute
> to the project.
> 
> <http://jakarta.apache.org/velocity/>
> 
> thanks,
> 
> -The Velocity Team
> 
> 
> 
> _______________________________________________
> WebMacro mailing list
> WebMacro@lists.semiotek.com
> Unsubscribe: http://lists.semiotek.com/mailman/listinfo/webmacro