Welcome Guest, Not a member yet? Register   Sign In
Poll: Improvement for Template Parser Class
You do not have permission to vote in this poll.
Yes!
68.75%
11 68.75%
No!
31.25%
5 31.25%
Total 16 vote(s) 100%
* You voted for this item. [Show Results]

Template Parser - class expansion
#4

(02-14-2016, 03:53 PM)ivantcholakov Wrote: @condor

There is another old idea proposed for CI3, according to which an external advanced template parser could be used through a driver.

In future terms for CI4, a service locator and adapters for parsers could be created (lately I see that DI has been scrapped). A possibility of using Twig and Mustache parsers is interesting for me.

Quick note to fend off haters - Dependency Injection has NOT been scrapped in CI4, it's used everywhere. A DI CONTAINER has been scrapped and replaced by something more like a factory. It does 95% of the job a container does with a LOT less complexity, makes debugging easier, etc.

(02-14-2016, 03:53 PM)ivantcholakov Wrote: The CodeIgniter default parser is quite simple now, yes. But I don't see perspective for its syntax expansion, there are better parsers already.

I think, for CodeIgniter parser an improvement that could be implemented is enforced HTML escaping by default with syntax for turning it off on selected places at will.

The plan is, I believe, to make it simple to integrate existing template engines, like Twig, Plates, etc. Exact implementation details are not decided on, yet. We will still have the Parser. The exact features are unknown but it's unlikely it will grow a whole lot from it is now.

My personal opinion, though, is that I agree with you. At the very least it needs the ability to do an IF/ELSE flow. I find it close to useless without that. Ideally, it would have the ability to create custom tags, but not included many additional ones out of the box. I don't know where it will end up, though, when all things are said and done.
Reply


Messages In This Thread
Template Parser - class expansion - by condor - 02-14-2016, 01:55 PM
RE: Template Parser - class expansion - by kilishan - 02-14-2016, 09:02 PM
RE: Template Parser - class expansion - by condor - 02-15-2016, 01:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB