什么是超光速文件

我是一个新的项目,必须彻底学习它。我看到了很多带有扩展名 .ftl的文件。我不确定那是什么。我知道它们可以被修改,用户可以在前端看到变化。

131547 次浏览

Freemarker template files I believe.

http://freemarker.org/

Have a look here.

Following files have FTL extension:

  • Family Tree Legends Family File
  • FreeMarker Template
  • Future Tense Texture

'ftl' stands for Freemarker Template. It combines server side objects and view side (HTML/JQuery) contents into a single viewable template on the client browser.
Some documentation which might help:

http://freemarker.org/docs/

Tutorials:

http://www.vogella.com/tutorials/FreeMarker/article.html

http://viralpatel.net/blogs/freemaker-template-hello-world-tutorial/

FTL stands for FreeMarker Template.

It is very useful when you want to follow the MVC (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.

An ftl file could just have a series of html tags just as a JSP page or it can have freemarker template coding for representing the objects passed on from a controller java file.
But, its actual ability is to combine the contents of a java class and view/client side stuff(html/ JQuery/ javascript etc). It is quite similar to velocity. You could map a method or object of a class to a freemarker (.ftl) page and use it as if it is a variable or a functionality created in the very page.