Recently , My friends and I were discussing about potential energy an kinetic energy and things like that which we studied in our 7 th or 8 th standard. Physics had always been my favorite subject and so we started from energy and we discussed about many topics in Physics and we came to the term velocity and one of them said velocity is displacement /time and i said velocity is framework.. He He …. Though I love physics , time to move to area J2ee. Everybody turned towards me and said “what???” .
I said , just take it as “velocity is framework like struts” . I wonder why that name id give to it???
Anyway for those who don’t know about it..
Velocity is a template language designed to give Web designers an easy way to present dynamic information to users of a Web site or application. To support the language, a collection of Java-based classes is used to create a bridge between the model and view components of the Model-View-Controller model.
One of the profound features of Velocity is the clear separation between the view and the rest of the paradigm providing only a simple syntax set, which the Web designer uses to display content. At the same time, Java programmers concentrate on the logic behind the application.
Velocity includes many features like:
– Velocity includes three different types of references:
Variables start with the $ character and are followed by an identifier. The value for the variable comes from the Java code via the context or the Set directive.
Properties start with the $ character, followed by an
identifier, then a dot, and finally another identifier. The property reference
is used either to obtain the attribute of a Java Object in the context or to
call a method of the object and use its return value. The method must have the
format to get.
Methods start with the $ character, followed by an
identifier, then a dot, followed by an identifier and method body, such as “(<parameter>)”. A call is made to the exact method identifier identified.
2) Directives – Velocity directives allow the Web designer to
have control over the references. Scripting elements include set, looping
constructs, conditionals, and includes, among others.
– Velocity makes use of the log4J system for logging.
4) Resources loaders
– the resource loaders give you a control over the templates used inthe production of Web pages.
Servers – Velocity supports all major application servers and servlet like
Tomcat Weblogic etc.
Read More about Velocity Here http://technoblizzard.blogspot.com/2007/04/velocity-intergration-with-struts.html
Powered by ScribeFire.