First of all, before writing this article, first share a word with you:
"What you can do now, do it seriously, don't worry about the future."
Ha, this sentence, actually really want to tell oneself just, write on the blog Phper, that time is really thought will always write PHP, unexpectedly, today changed to ASP.net.
OK, other don't say, perhaps later also have phper to asp.net or asp.net go to PHP also not necessarily ha. So, write down this article today, so that I am familiar with the smarty and the VT template to contrast.
I have always believed that learning a new technical language will be quicker and more impressive only after comparing the language that you are very familiar with.
Of course, these two are just a template engine, the technical difficulties are not particularly complicated. And their common goal is to display the backstage data to the foreground display page.
All of the following feature points are listed:
1, a single variable output on the page, and some formatting on the processing. Example: Time format
2, list variable or array variable output on the page, a foreach output list.
3, through the template engine calls the background method, the results show.
As far as I'm concerned, knowing this can work pretty well in a project. If there are omissions, please comment on the brick. Thank you.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/PHP/
4, of course, I study in school experience, the teacher's words do remember very deeply, understand a grammar of the additions and deletions to check, you can almost do a simple system. Like this template engine, but also in order to distinguish between the background and the front desk and the cleanliness of the front page, so not particularly complex, the main processing are display variables, judgment statements, and circular data display. Hope to be able to help learn smarty or learn from one of the VT templates of one of the students to understand another template engine. This is also my personal feel more important, will be these almost the project is not a problem.
Specific words, want to in-depth students can look at the handbook:
Smarty Manual: http://www.php100.com/manual/smarty/
VT Template Engine Tutorial: http://www.cnblogs.com/kingthy/tag/vtemplate/