Apache Velocity

Apache Velocity

Infobox Software
name = Apache Velocity



caption =
developer = Apache Software Foundation
latest release version = 1.5
latest release date = release date|2007|03|06
latest preview version =
latest preview date =
operating system = Cross platform
programming language = Java
genre = template engine
license = Apache License 2.0
website = http://velocity.apache.org

Apache Velocity is an open source software project directed by the Apache Software Foundation. Velocity is a Java-based template engine that provides a simple yet powerful template language to reference objects defined in Java code. Its aim is to ensure clean separation between the presentation tier and business tiers in a Web application (see model-view-controller design pattern).Some common types of applications which use Velocity are:

* Web applications: Web designers create HTML pages with placeholders for dynamic information. The page is processed with [http://velocity.apache.org/tools/devel/view/ VelocityViewServlet] or any of a number of frameworks which support Velocity. This approach to web application development is called Model-view-controller (MVC), and is intended to be a direct replacement for applications developed with JSP or PHP.
* Source code generation: Velocity can be used to generate Java source code, SQL, or PostScript, based on templates. The [http://wiki.apache.org/velocity/PoweredByVelocity PoweredByVelocity] page lists a number of open source, and commercial development software packages which use Velocity in this manner.
* Automatic emails: Many applications generate automatic emails for account signup, password reminders, or automatically sent reports. Using Velocity, the email template can be stored in a text file, rather than directly embedded in Java code.
* XML transformation: Velocity provides an Ant task, called Anakia, which reads an XML file and makes it available to a Velocity template. A common application is to convert documentation stored in a generic "xdoc" format into a styled HTML document.

Code example

The following template:


## Velocity Hello World #set( $foo = "Velocity" ) ## followed by Hello $foo World!

processed by Velocity will produce the following text:

Hello Velocity World!

The syntax and overall concept of the Apache Velocity templates is very similar to the syntax of the older WebMacro template engine which is now also an open source project.

ee also

*JSP
*FreeMarker

External links

* [http://velocity.apache.org/ Velocity at Apache]
* [http://wiki.apache.org/velocity/ Velocity wiki]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Apache Velocity — Entwickler Apache Software Foundation Aktuelle Version 1.7 (29. November 2010[1]) Betriebssystem plattformunabhängig Programmie …   Deutsch Wikipedia

  • Apache Velocity — Développeur Fondation Apache Dernière version …   Wikipédia en Français

  • Apache Velocity — О проекте Microsoft под кодовым названием Velocity см. Velocity (кэш память). Apache Velocity Тип Обработчик шаблонов Разработчик Apache Software Foundation Написана на …   Википедия

  • Velocity (informatique) — Apache Velocity Apache Velocity Développeur Fondation Apache Dernière vers …   Wikipédia en Français

  • Velocity — Apache Velocity Тип Платформа программирования Разработчик Apache Software Foundation ОС Кроссплатформенное программное обеспечение Версия 1.5 Лицензия Apache 2.0 license Сайт …   Википедия

  • Velocity (disambiguation) — Velocity can mean: * Velocity in physics * Speed * Velocity (biochemistry), a subject of Michaelis Menten kinetics in biochemistry. * Velocity (novel), by US author Dean Koontz * Velocity (newspaper), a weekly alternative newspaper in Louisville …   Wikipedia

  • Apache-Lizenz 2.0 — Die Apache Lizenz ist die Freie Software Lizenz der Apache Software Foundation. Die aktuelle Version 2.0 wurde im Januar 2004 veröffentlicht. Sie wurde gegenüber der vorherigen Version 1.1 stark erweitert. Aufgrund ihres Umfangs wird in den… …   Deutsch Wikipedia

  • Apache License — Die Apache Lizenz ist die Freie Software Lizenz der Apache Software Foundation. Die aktuelle Version 2.0 wurde im Januar 2004 veröffentlicht. Sie wurde gegenüber der vorherigen Version 1.1 stark erweitert. Aufgrund ihres Umfangs wird in den… …   Deutsch Wikipedia

  • Apache Lizenz — Die Apache Lizenz ist die Freie Software Lizenz der Apache Software Foundation. Die aktuelle Version 2.0 wurde im Januar 2004 veröffentlicht. Sie wurde gegenüber der vorherigen Version 1.1 stark erweitert. Aufgrund ihres Umfangs wird in den… …   Deutsch Wikipedia

  • Apache Software License — Die Apache Lizenz ist die Freie Software Lizenz der Apache Software Foundation. Die aktuelle Version 2.0 wurde im Januar 2004 veröffentlicht. Sie wurde gegenüber der vorherigen Version 1.1 stark erweitert. Aufgrund ihres Umfangs wird in den… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”