You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use PHP templating to render the display pages. We may want to consider incrementally migrating to Twig (https://twig.symfony.com/doc/) instead.
Benefits:
One of the most standard PHP templating libraries.
Enforces a serializable, read-only data model (whereas PHP templating still has access to our PHP libraries and can modify the state of existing objects and databases).
The syntax is less verbose {{ bla }} vs. <?php echo $bla; ?> and has many convenient functions for manipulating the data (e.g. escaping etc.).
Downsides:
It's an entirely new language that must be learned to maintain our codebase.
It creates a dependency on an external library (though it is so popular that it is unlikely to be abandoned).
The additional overhead likely would incur a small runtime penalty.
The text was updated successfully, but these errors were encountered:
We currently use PHP templating to render the display pages. We may want to consider incrementally migrating to Twig (https://twig.symfony.com/doc/) instead.
Benefits:
{{ bla }}
vs.<?php echo $bla; ?>
and has many convenient functions for manipulating the data (e.g. escaping etc.).Downsides:
The text was updated successfully, but these errors were encountered: