开发者

Besides placeholder substitution what other features should a templating system include?

开发者 https://www.devze.com 2023-02-06 09:44 出处:网络
Just what are the minimum essential features of a templating system besides the obvious placeholder substitution?

Just what are the minimum essential features of a templating system besides the obvious placeholder substitution?

Give examples of l开发者_StackOverflowibraries if you wish and what makes them cool and what bits about them suck and maybe should not be there...


  • Ability to generate ODT, PDF, RTF, HTML, MS Word, MS Excel, and plain text files from templates
  • i18n support
  • no need to be a replacement for JSP etc. we have enough of those
  • ability to generate source code (Java 5 or more)
  • Merge capability
  • dynamic loading of templates
  • ability to include templates
  • 1 single jar with no other dependencies (specially commons-logging)

Here are some of the available templating engines in Java. Velocity, FreeMaker and StringTemplate, I believe are most popular. You can have the best of all of them.

0

精彩评论

暂无评论...
验证码 换一张
取 消