-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
As suggested by @Flyingmana I moved the discussion from #107 into a new issue.
In the mentioned issue, @sshymko said:
Most probably all existing phtml templates are going to be kept, no Twig templates are going to be provided out of the box. However, ability to create your own Twig templates is already there.
To which I responded:
Please stick with one solution: either phtml or Twig. I believe it will do more harm than good if you split up the community into one half phtml, one half Twig. More choices isn't always good.
I'm afraid "good" developers would use Twig, "bad" developers would use phtml. You will get a wild mix of two different templating systems.
Some reactions from others in the same issue:
Twig: +1 for @mzeis otherwise you will see in the phtml again a lot of business logic. it is too alluring to use incorrect and inperformant PHP patterns in the templates ...
Agreed with the above. A mix of template patterns is going to lead to a lot of the sloppy code and sloppy extension problems that exist in the Magento ecosystem (mainly 3rd party plugins) today.
If the decision is to embrace Twig, it should be embraced across the board and not selectively.
+1 for standardizing on one template idiom. Swappable template types could possibly be a "nice-to-have", but I'm more than happy to have Twig be the One True Template Type®.
+1 for Twig, it's the only template format with logic that can be parsed with both JS and PHP that I've come accross
👍 for standardization. 👎 for Twig.
There are enough things to teach with regard to Magento; another idiom, templating, or meta-language isn't one I care to have to learn or instruct.