Welcome Guest, Not a member yet? Register   Sign In
Opinion: Template Engine Integration RIP?

There has been lots of chatter about templating engines, and their support/integration/assimilation into CI4.
I have taken a look at all the ones suggested/insistedon/beggedfor, and a few more: div, dwoo, foil, haanga, latte, lex, plates, scurvy, smarty, ste, tbs & twig.
I have come to the conclusion that each one of these has its own philosophy/dependencies/assumptions/"api", and that is it not practical to have any sort of tight integration with any of them, nor do we want to undertake to support such a dog's breakfast!

Some of these engines look very powerful, some are bloated, some are not ready for prime time - but they are all valid tools that a developer might want to use in a webapp project, and it would be awesome to have an elegant solution for exploiting them.

One of the community members pointed out FuelPHP, with adapters to a number of them. I took a look at https://github.com/fuel/parser, which looks like a good solution for them, with some interesting takeaways for CI. Their Parser is a bit clunky, with configuration for all the engines in one class, and each adapter extends Fuel's View. The smarty & twig adapters have a Fuel extension as well, providing a number of Fuel-like functions for use inside template files. Bottom line: although a separate repo, this does not look like it is meant to be plugged into an app using a different framework.

I would call Fuel's template engine "integration" loosely coupled, in that it primarily binds an engine to a View object intended to process files passed as method parameters. ANy advanced template engine capabilities have to be incorporated into your template files/classes on your own, and those are not "known" to any of the other Fuel components.

This looks like a possible way to accommodate different engines, but is way out-of-scope for CI4's phase 2 and possibly phase 3. Further, it will only happen if the community steps up, i.e. developers familar with an engine would have to build and support an adapter for that engine.

I suggest that this issue/featurerequest/demand be put to bed for now, i.e. deferred until we have a solid base for CI4. We will have a better feel then for how to architect adapters for all the kinds of things the community would like to see integrated.
James Parry
Project Lead

Messages In This Thread
Opinion: Template Engine Integration RIP? - by jlp - 07-19-2016, 11:51 PM

Theme © iAndrew 2016 - Forum software by © MyBB