一些PHP模板引擎进行了速度优化。
基本模板引擎操作非常简单。
The operation of a basic templating engine is quite straightforward. First consider the template in Listing 1
它不需要任何已定义的模板引擎或者类库。
It doesn't require any custom templating engines or class libraries.
我需要做的最后一件事情是添加模板引擎特定的代码。
The last thing I need to do is add the template engine-specific code.
还有一个试验性的插件,阐述了模板引擎的工作方式。
An experimental plug-in is available, demonstrating how the templating engine is supposed to work.
JET2是用于Eclipse环境的一个模板引擎。
在生成页面时,Velocity模板引擎会替换这个变量。
This is a variable that is replaced by the Velocity template engine when the page is generated.
从这个单纯的意义上讲,Velocity是一个模板引擎。
如果不熟悉模板引擎,那么可能需要快速地回顾一下上月的文章。
If you're unfamiliar with template engines, you might want to quickly review last month's article.
当模板引擎运行时,清单1中彩色显示的部分将被实际的数据替换。
The bold lines in the Listing 1 template will be replaced by actual data when the templating engine runs.
如果将模板引擎与之结合使用的话,它将会是一个极为强大的代码生成工具。
When combined with a template engine, it can be a very powerful tool in code generation.
如何选择模板引擎在很大程度上取决于要求,因此适宜进行少量研究和试验。
Choosing a template engine depends largely on your requirements, so a little research and experimentation is in order.
要增加的第一个特性就是模板引擎,它能够通过模板以灵活的方式呈现数据。
The first feature to be added is a templating engine useful to render data in a flexible way through templates.
解析模板的模板引擎会尝试装载其后缀与提交的浏览器地区对应的模板文件。
The template engine parsing the templates will try to load template files which have a suffix corresponding to the submitted browser locale.
XSLT 2.0为寻求代码生成模板引擎的开发人员提供了广泛的语言能力。
XSLT 2.0 offers expanded language capabilities to developers seeking a template engine for code generation.
然后我们将把这个模板引擎集成到StrutsMVC框架中作为视图组件。
We'll then integrate the template engine into the Struts MVC framework as a view component.
最后,您不必使用模板引擎来创建视图—只需沿用旧式的HTML和php即可。
Finally, you don't have to use a templating engine to create your views-just old-fashioned HTML and PHP will do.
在下一节中,我们将会使用一个更加复杂的例子对Groovy模板引擎进行测试。
In the next section, I'll put Groovy's template engine to the test with a more complicated example.
利用ApacheVelocity16开源模板引擎将转换本身实现为模板。
Transformations themselves are implemented as templates using the Apache Velocity 16 open source template engine.
接下来,您将通过使用Velocity模板引擎定义的视图来替代对JSP的使用。
Next you'll replace the use of JSPs by using views defined with the Velocity templating engine.
如果您使用的不是一个框架来执行一个具体的设计模式,那么您想要使用的是模板引擎。
If you're not using a framework that enforces a specific design pattern, chances are you want to be using a templating engine.
这就避免了开发人员从一开始就忙于复杂的配置选项,让他们能马上体验到这种模板引擎。
This frees the developer from tinkering with complex configuration options at the initial get-go and allows him or her to experiment immediately with the template engine.
为了在业务逻辑层和表示层之间自由地移动(使用PHP模板引擎),还需要掌握PHP。
The ability to use PHP to move freely between the business logic layer and the presentation layer (using the PHP template engine) was also very appealing.
例如,php脚本可能使用一个模板引擎把业务逻辑与表示分隔开,它可以被看作单独的两层。
For example, a PHP script might use a template engine to separate business logic from the presentation, and be considered two separate tiers.
所以,我们都同意就如何模板引擎,可以为开发人员非常有用的工具,节省时间堆。
So, we can all agree on how template engines can be a very helpful tool for a developer and save heaps of time.
因为这项任务比较简单,也可以用Velocity或XSLT这样的模板引擎来实现该任务。
Given the simplicity of the task, you might get by with a template engine such as Velocity or XSLT.
模板引擎可以改善这个过程,它在模板中保留输出中的静态部分,而动态生成和安排变化的部分。
A templating engine can facilitate this process by maintaining the static portion of the output in templates, while dynamically generating and positioning the changing portions.
当模板引擎处理简单的占位符元素时,您可以用值、组件或作为页面一部分的结构来替换这些元素。
You can then replace simple placeholder elements with values, components, or structures that become part of the page when the template engine processes them.
模板引擎然后可以通过读取该模板并在这些占位符和运行时的值之间建立映射来实现对模板的转换。
A template engine would then transform the template by reading it and mapping placeholders with run-time values.
除了修改Velocity使用的页面映射外,还可以决定不使用Velocity作为模板引擎。
Along with the page mapping that Velocity USES, you can decide not to use Velocity as your templating engine.
应用推荐