模板代码分离的写法究竟好不好?该如何处理

WBOY
Release: 2016-06-13 13:49:56
Original
965 people have browsed it

模板代码分离的写法究竟好不好???
网上著名的框架有很多,,模板分离的框架貌似只有thinkphp,,然后我看了一下codeigniter,它也有简单的模板分离,但是手

册上说,这种写法效率不高,因为要解析模板标记,所以还是推荐php脚本的写法,然后看了一下zend ,cake之类的框架,也

不是以模板分离的设计为主要结构的。听听众人的意见

------解决方案--------------------
分离当然是好的了。

可以让前端与后台人员的工作的分配
后台只管后台,前面只管显示,各不影响,对后期维护等方便很多。


thinkphp 有自己一套模板语言,这是可以更方便的输出,和前端显示这两个优点。
CI 是木有模板语言,使用的是php原生语言的,这个可以减去模板语言解析成php语法的过程,效率应该会快点。

我个人还是喜欢使用php原生语法的。。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!