Velocity vs. JSP, Freemarker
In the Java field, there are three main performance layer technologies: JSP, Freemarker, Velocity.
JSP is the most familiar technology of everyone
Advantages:
1. Powerful function, can write Java code
2. Support JSP tag (JSP tag)
3. Support Expression language (EL)
4, the official standard, a wide range of users, a wealth of third-party JSP Tag Library
5, good performance. JSP compiled into class file execution, good performance
Disadvantages:
JSP has no obvious shortcomings, it is not to pick a bone that is, because you can write Java code, such as improper use easily destroy the MVC structure.
Velocity is a template language that appears earlier to replace JSP
Advantages:
1. Cannot write Java code, can achieve strict MVC separation
2, good performance, is said to be better than JSP performance
3, using the expression language, it is said that the expression of JSP language is learning velocity
Disadvantages:
1. Not the official standard
2, user groups and third-party tag libraries do not have more JSP.
3, the JSP tag support is not good enough
Freemarker
Advantages:
1. Cannot write Java code, can achieve strict MVC separation
2, the performance is very good
3. Good support for JSP tags
4, built in a lot of common functions, easy to use
5, macro definition (like JSP tags) very convenient
6. Using an expression language
Disadvantages:
1. Not the official standard
2, user groups and third-party tag libraries do not have more JSP
Performance: Velocity should be the best, followed by JSP, the normal page Freemarker performance is the worst, but on the complex page (contains a lot of judgment, date amount formatted) on the page, Freemarker performance than the use of tag and El jsp good.
Velocity vs. JSP, Freemarker