TP has a lot of built-in labels, judging comparisons, loops, and so on, using PHP to do the service side of the development of the front end with more, personally think these tags will complicate the readability of HTML, and the front and back of the engineer should not waste time on these labels ...
I thought about two points:
To say inheritance, the previous project with CI rewrite the Load object, but also with PHP to assemble HTML. There will be no hard-to-find place in this area.
If the front and back end of the separation, I think web development itself is a need for a relatively broad knowledge of the work, and must have a docking part, using the template engine after the front end still has to write a lot of template variables (less than a few characters this is true ...) )。
Finally, it is thought that the program should be considered to solve the problem, and consider performance first. So not very understanding of the original design of the template, TP source code is not fully read, do not understand the performance of these built-in tags problems.
Just started with TP, maybe I have the wrong understanding don't despise me ...
Reply content:
TP has a lot of built-in labels, judging comparisons, loops, and so on, using PHP to do the service side of the development of the front end with more, personally think these tags will complicate the readability of HTML, and the front and back of the engineer should not waste time on these labels ...
I thought about two points:
To say inheritance, the previous project with CI rewrite the Load object, but also with PHP to assemble HTML. There will be no hard-to-find place in this area.
If the front and back end of the separation, I think web development itself is a need for a relatively broad knowledge of the work, and must have a docking part, using the template engine after the front end still has to write a lot of template variables (less than a few characters this is true ...) )。
Finally, it is thought that the program should be considered to solve the problem, and consider performance first. So not very understanding of the original design of the template, TP source code is not fully read, do not understand the performance of these built-in tags problems.
Just started with TP, maybe I have the wrong understanding don't despise me ...
With the native PHP code, and the template, the final effect is the same, the template will be parsed into the native code. To say efficiency, the feeling is not very different.
I think that since you use the framework, it is of course to use their templates to write code better, after all, the developers of each template, have been thoughtful to do a variety of convenient settings. You have to write native PHP, then you need to use the framework, and if you do not follow the framework of the specification development, for you later faster use of the framework is also not benefit.
Framework is easy for us to develop faster, but in the use of the framework, the basic principles, but also need their own deep learning, the foundation is still solid.
I feel the role of template tags is to write less PHP in HTML
PHP is a very flexible language, there is no template engine constraints, I feel that the front-end HTML code will embed PHP very much, and maybe even some people function is defined in the inside, or some logic is written in the inside, but with the template engine to do so few people, whether it is not a novice
Performance what does not need to pay too much attention, even if using the template engine, you can parse it into HTML mixed PHP form to cache it, theoretically you just the first time through the regular resolution, the second can not be resolved again.
Just for the front-end separation, the template engine is much the same, and the front-end developer learns its usage costs far less than the cost of learning a language.
The syntax coloring for the editor is normal