Saturday, October 8, 2011

Part 1- Apache Velocity - ( Introduction )

 Introduction
In simple terms – Apache velocity is open source software that can be used to generate dynamic content for email, sms etc. For example –One wants to write an application which will send the “password” or “account activation link”. Normally the content of such email is fixed only certain sections such as “Password value”, “Salvation – Mr. or Ms.” change for each email. Using apache velocity, one can use a normal text file, to define the fixed content, and dynamic data, password value, to generate the email content. The Integration of text file and dynamic data is quite fast. On top of that one can define rules within the text file. So overall one can code with in a text file. 
Example of template – 

Hi $data.get(“UserName”) 
Your password is $data.get(“password”) 

Thanks, 
Jovialjava team  

This is the text from Wiki- Apache Velocity (formerly known as Jakarta 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 (the model–view–controller design pattern).

No comments: