What template engine to take on new project in php?

0 like 0 dislike
29 views
Many of inertia using Smarty, someone is trying Twig, some exotic Blitz, now I want to learn public opinion.


Blitz in my opinion has a significant drawback — high labor costs to develop, as it requires close interaction between the designer and the programmer for changes and for rapid development/prototyping, in my opinion, is not very suitable.


From Smarty-like systems I only know of Twig, maybe there are still good options? From templating, want of objectivity and extensibility.
by | 29 views

7 Answers

0 like 0 dislike
A good templating engine, perfectly integrating with PHP is called PHP...:) the templates are good to use alternative syntax.
by
0 like 0 dislike
XSLT suggest. It is possible for XML-ku to collect some thread SimpleXML — very convenient. Each module of the project can in one and the same object SimpleXML to insert your data then XSLT will decide what he needs.
\r
Of the benefits — well tolerated among languages (if you need), you can use the same XSLT to try to implement a REST API. Yes, just the right style is quite imposing when you create templates. Again, for NGINX there are modules for XSL transformations within it (although no reason to do standardization in the lung asynchronous web server I personally do not see)
\r
If you manage rasparennye templates somehow to keep in memory between requests (for PHP hard to implement perhaps) then all will fly.
by
0 like 0 dislike
Twig template inheritance, a compilation of templates in chitabelny view (class), all the best from Smarty, sandbox, auto escaping of strings, there are classes ready to integrate in almost all framwork. Blitz is not very convenient to work with the templates, I found it very tight for development. Speed Blitz... this is a dubious advantage — compiled templates tviga + eAccelerator will not give Blitzу.
by
0 like 0 dislike
all the time wondered why the PHP people are looking for some template engines.
the language itself is a powerful template engine.
\r
everything else, except XSLT+XML from the evil one.
by
0 like 0 dislike
Smarty
by
0 like 0 dislike
Can view to the side XSLT? Very high separability of code from presentation. Speed will probably be slower than the above. But the experience often negates all the cons.
by
0 like 0 dislike
CTPP2
\r
Pros:
— high speed
— extensibility (you can add your own functions)
— one set of data for standardization on the server and on the client (JSON)
— recently, a module for the standardization of forces with nginx, it is not yet production-ready, but I think it will quickly become so
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
7 answers
0 like 0 dislike
1 answer
asked Mar 28, 2019 by ertaquo
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users