Java 什么是 FTL 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1039510/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are FTL files
提问by
I am new to a project and have to learn it inside out. I see a lot of files with the extension .ftl
in them. I'm not sure what they are. I know they can be modified and the user sees changes in the front end.
我是一个项目的新手,必须从内到外学习它。我看到很多带有扩展名的文件.ftl
。我不确定它们是什么。我知道它们可以被修改,用户会看到前端的变化。
回答by Jon
Freemarker template files I believe.
我相信 Freemarker 模板文件。
回答by MSpreij
http://filext.com/file-extension/FTLpoints to http://freemarker.sourceforge.net/, does that help?
http://fileext.com/file-extension/FTL指向http://freemarker.sourceforge.net/,这有帮助吗?
回答by schnaader
回答by NixRam
'ftl' stands for freemarker. 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:
'ftl' 代表自由标记。它将服务器端对象和视图端 (HTML/JQuery) 内容组合到客户端浏览器上的单个可查看模板中。
一些可能有帮助的文档:
Tutorials:
教程:
http://www.vogella.com/tutorials/FreeMarker/article.html
http://viralpatel.net/blogs/freemaker-template-hello-world-tutorial/
http://www.vogella.com/tutorials/FreeMarker/article.html
http://viralpatel.net/blogs/freemaker-template-hello-world-tutorial/
回答by antonjs
FTL stands for FreeMarker Template.
FTL 代表 FreeMarker 模板。
It is very useful when you want to follow the MVC (Model View Controller) pattern.
当您想遵循 MVC(模型视图控制器)模式时,它非常有用。
The idea behind using the MVC pattern for dynamic Web pages is that you separate the designers (HTML authors) from the programmers.
对动态 Web 页面使用 MVC 模式背后的想法是将设计者(HTML 作者)与程序员分开。
回答by NixRam
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.
一个 ftl 文件可以像 JSP 页面一样只有一系列 html 标签,或者它可以有 freemarker 模板编码来表示从控制器 java 文件传递的对象。
但是,它的实际能力是将 java 类的内容和视图/客户端的东西(html/JQuery/javascript 等)结合起来。它与速度非常相似。您可以将类的方法或对象映射到 freemarker (.ftl) 页面,并将其用作在页面中创建的变量或功能。