What is freemarker?

Source: Internet
Author: User

Freemarker is a "template engine"; a generic tool to generate text output (anything from HTML to autogenerated source code) based on templates. it's a Java package, a class library for Java programmers. it's not an application for end-users in itself, but something that programmers can embed into their products.

Freemarker is designed to be practical for the generationHTML Web pages, Maid by servlet-based applications followingMVC(Model View Controller) pattern. the idea behind using the MVC pattern for dynamic web pages is that you separate the designers (HTML authors) from the programmers. everybody works on what they are good. designers can change the appearance of a page without programmers having to change or recompile code, because the application logic (Java programs) and page design (freemarker templates) are separated. templates do not become polluted with complex program fragments. this separation is useful even for projects where the programmer and the hmtl page author is the same person, since it helps to keep the application clear and easily maintainable.

Although freemarker has some programming capabilities, it isNotA full-blown programming language like PHP. Instead, Java programs prepare the data to be displayed (like issue SQL queries), and freemarker just generates textual pages that display the prepared data using templates.

Freemarker isNotA Web application framework. it is suitable as a component in a web application framework, but the freemarker engine itself knows nothing about HTTP or Servlets. it simply generates text. as such, it is perfectly usable in non-web application environments as well. note, however, that we provide out-of-the-box solutions for using freemarker as the view component of model 2 frameworks (e.g. struts), which also let you use JSP taglibs In the templates.

Freemarker is free, with BSD-style license. It is OSI certified Open Source Software. OSI certified is a certification mark of the Open Source Initiative.

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.