Differences between jsp, freemarker, and velocity

Source: Internet
Author: User

In the past, the web Development page layer was basically used. Recently, the webpage Layer Technology of the company's java project was velocity. I heard that jsp is going to be eliminated, and I do not know whether it is true or false, but I still like jsp. Below are the differences between the three technologies on the javaweb project page found on the Internet. In the java field, there are three main presentation layer technologies: jsp, freemarker, and velocity. Jsp is a technical advantage that everyone is most familiar with: 1. It has powerful functions and can write java code. 2. It supports jsp tags. 3. It supports Expression Language (el). 4. It is an official standard, wide user base, rich third-party jsp tag library 5, good performance. Jsp is compiled into a class file for execution, which has good performance disadvantages: jsp has no obvious disadvantages. It is necessary to pick out the points, that is, because java code can be compiled. improper use may easily damage the mvc structure. Velocity is an earlier template language used to replace jsp. Advantages: 1. java code cannot be written, and strict mvc separation can be achieved. 2. good performance, it is said that the performance is better than jsp 3. Using expression language, it is said that jsp Expression Language is the disadvantage of learning velocity: 1. It is not an official Standard 2. There are not many jsp users and third-party tag libraries. 3. insufficient support for jsp tags advantages of freemarker: 1. You cannot write java code, strict mvc separation can be implemented. 2. Excellent performance. 3. good support for jsp labels. 4. A large number of built-in common functions. 5. convenient use. 5. macro definition (similar to jsp labels) ease of use 6. disadvantages of using Expression Language: 1. It is not an official standard. 2. Why does the user group and third-party tag library not use jsp to select freemarker? 1. performance. Velocity should be the best, followed by jsp. The freemarker of common pages has the worst performance (although the gap between several milliseconds and dozens of milliseconds ). However, on pages with complex pages (including a large number of judgments and formatting of date amounts), freemarker has better performance than jsp with tag and el. 2. macro definition is more convenient than jsp tag 3. A large number of built-in common functions. For example, html filtering and date amount formatting are very convenient to use. 4. Support for jsp tags 5. Implement strict mvc separation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.