Hello,
As a web developer, I try to learn to customize most available platforms, I really like the architecture of Opencart, it's somehow similar to a decent but retired platform called OSC. But 1 annoying feature with Opencart is the existing of PHP engines, TPL previously and TWIG recently.
Other major platforms like WordPress and Magento didn't integrated any of those. Can I know what are the main reasons to use those languages on top of PHP ?
Thanks
As a web developer, I try to learn to customize most available platforms, I really like the architecture of Opencart, it's somehow similar to a decent but retired platform called OSC. But 1 annoying feature with Opencart is the existing of PHP engines, TPL previously and TWIG recently.
Other major platforms like WordPress and Magento didn't integrated any of those. Can I know what are the main reasons to use those languages on top of PHP ?
Thanks
I don't know why Daniel did it but I really like working with TWIG. TPL on the other hand can suck my ***
Using Twig as a template engine certainly was a poor choice.
The Symfony implementation of Twig is of poor quality, it does not directly translate from Twig into the final HTML.
It's language syntax is bad, no proper LALR(1) grammar is defined here. Some of its operators use strange notations, such as for the binary operators using 'b-or', 'b-and', and 'b-xor' instead of the more common '|', '&', and '^'. It has a number of duplicate functions and tags doing he same thing. It uses the strange '~' as the string concatenator. In other languages the '~' stands for the not-operator, and they use '+' or '.' for the string concatenator.
It has a non-intuitive filter syntax, instead of using simple functions for this.
There are other template engines out there doing a better job. PHP itself is already is a template language anyway. Twig is just another example of trying to re-invent the wheel.
The Symfony implementation of Twig is of poor quality, it does not directly translate from Twig into the final HTML.
It's language syntax is bad, no proper LALR(1) grammar is defined here. Some of its operators use strange notations, such as for the binary operators using 'b-or', 'b-and', and 'b-xor' instead of the more common '|', '&', and '^'. It has a number of duplicate functions and tags doing he same thing. It uses the strange '~' as the string concatenator. In other languages the '~' stands for the not-operator, and they use '+' or '.' for the string concatenator.
It has a non-intuitive filter syntax, instead of using simple functions for this.
There are other template engines out there doing a better job. PHP itself is already is a template language anyway. Twig is just another example of trying to re-invent the wheel.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Personally I find this TWIG add more complication to the job.. Unless it have a really good purpose. I tried to search what could be the purpose, and the only repetitive answer was "security reasons". But I think PHP con't lack proper security.JNeuhoff wrote: ↑Sun Mar 14, 2021 9:31 pmUsing Twig as a template engine certainly was a poor choice.
The Symfony implementation of Twig is of poor quality, it does not directly translate from Twig into the final HTML.
It's language syntax is bad, no proper LALR(1) grammar is defined here. Some of its operators use strange notations, such as for the binary operators using 'b-or', 'b-and', and 'b-xor' instead of the more common '|', '&', and '^'. It has a number of duplicate functions and tags doing he same thing. It uses the strange '~' as the string concatenator. In other languages the '~' stands for the not-operator, and they use '+' or '.' for the string concatenator.
It has a non-intuitive filter syntax, instead of using simple functions for this.
There are other template engines out there doing a better job. PHP itself is already is a template language anyway. Twig is just another example of trying to re-invent the wheel.
That's why I asked the community here maybe there is a cause or more to use it.
Personally we use the PHP template engine for some extensions with the aid of the Template Switcher on multiple OpenCart 3.x sites.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Who is online
Users browsing this forum: No registered users and 9 guests