What is freemarker?

Source: Internet
Author: User
Freemarker is a template engine and a text-based template output tool (generating arbitrary HTML form code ). It is a Java package and class library for Java programmers. It is not an end-user application, but allows programmers to embed it into their products.

Freemarker is designed to generate HTML web pages, especially MVC (Model View Controller)-based applications. The idea of using the MVC pattern as a dynamic web page is to separate page designers (HTML designers) and programmers .. Everyone makes what they are good. Designers can change the web page without modifying the programmer's code, because the application logic (Java program) and page design (freemarker template) are separated. Templates will not be damaged by complex and complex program frameworks. This separation is useful even when the programmer of a project and the creator of the himtl page are the same person, because it helps to keep the application clear and easy to maintain. Although freemarker has some programming capabilities, it is not a mature programming language like PHP. Different from Java, Java programs prepare data for display (such as SQL queries), while freemarker only generates a text page, which displays the preparation data for the template. Freemarker is not a web application framework, but is more suitable for serving as a component in the Web application framework. However, freemarker engine itself does not care about HTTP or Servlets, but only generates text. In a non-web application environment, it can also demonstrate its perfect use. However, it is worth noting that we provide a convenient solution for using freemarker. As a view component of the model2 framework (such as struts), you can also use JSP labels in the template. Freemarker is free and has BSD-style license. It is an open source software certified by OSI. Note:1. What is Servlet?
Servlet is a server program written in Java. It has nothing to do with the Protocol and platform. Servlet runs in Java-enabled web server. Java Servlet can dynamically expand server capabilities and provide Web Services in the request-response mode.

The earliest Java Web server that supports Servlet technology is javasoft. Later, some other Java-based Web servers began to support standard servlet APIs. The main function of servlet is to interactively browse and modify data to generate dynamic web content.


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.