Apache Velocity

1

Apache Velocity first released in April 2001, is a Java-based template engine that provides a template language to reference objects defined in Java code. It aims to ensure clean separation between the presentation tier and business tiers in a Web application (the model–view–controller design pattern). Velocity is an open source software project hosted by the Apache Software Foundation. It is released under the Apache License. Jon Scott Stevens derived the name from the AltiVec Velocity Engine in the PowerPC G4 chip.

Uses

Some common types of applications that use Velocity are:

Code examples

The following template: processed by Velocity produces the following HTML: Another example using conditions: AWS API Gateway body mapping template, for DynamoDB HTTP: Another example with optional array; without condition will fail because of invalid resulting JSON: The syntax and overall concept of the Apache Velocity templates is similar to the syntax of the older WebMacro template engine, which is now also an open source project.

This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.

Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.
Bliptext is not affiliated with or endorsed by Wikipedia or the Wikimedia Foundation.

View original