加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – Smarty和Zend有什么区别?

发布时间:2020-12-13 22:37:59 所属栏目:PHP教程 来源:网络整理
导读:我遇到了Smarty这是一个模板引擎.但也有Zend,Cake PHP框架. Smarty像Zend,还是完全不同? Smarty只是将逻辑与显示区分开来 – 这类似于像Zend这样的框架吗? Smarty是一个模板引擎,而Zend是一个完整的php框架. Smarty的 Smarty是一个用PHP编写的Web模板系统.
我遇到了Smarty这是一个模板引擎.但也有Zend,Cake PHP框架. Smarty像Zend,还是完全不同? Smarty只是将逻辑与显示区分开来 – 这类似于像Zend这样的框架吗?
Smarty是一个模板引擎,而Zend是一个完整的php框架.

Smarty的

Smarty是一个用PHP编写的Web模板系统. Smarty主要被推广为分离关注点的工具,这是某种应用的常见设计策略.[1] [2]

Smarty generates web content by the
placement of special Smarty tags
within a document. These tags are
processed and substituted with other
code.

Tags are directives for Smarty that
are enclosed by template delimiters.
These directives can be variables,
denoted by a dollar sign ($),
functions,logical or loop statements.
Smarty allows PHP programmers to
define custom functions that can be
accessed using Smarty tags.

Smarty is intended to simplify
compartmentalization,allowing the
presentation of a web page to change
separately from the back-end. Ideally,
this eases the costs and efforts
associated with software maintenance.
Under successful application of this
development strategy,designers are
shielded from the back-end coding,and
PHP programmers are shielded from the
presentation coding.

Zend公司

ZF是一个随意使用的框架.尽管ZF确实为MVC,表数据网关和行数据网关设计模式提供了组件,但Zend Framework用户不必遵循单一的开发范例或模式. Zend Framework为Web应用程序开发中的许多其他常见需求提供了单独的组件.[1]

Zend Framework还致力于在PHP社区中推广Web开发最佳实践; ZF中的约定并不像许多其他框架那样常用,而是通过设置合理的默认值来提出建议,这些默认值可以针对每个ZF应用程序的特定要求进行覆盖.[4]

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读