Finding a Template Engine tutorial
Anyone here know where to find a decent tutorial for writing a template engine in php using mysql? I've found two but I'd like to look at a couple more.
The ones I have are
Id recommend using an off the shelf solution, there are many out there... one that we have used for projects at work is: http://www.twig-project.org/
Otherwise you are looking at writing advanced regular expression and debugging it, it is obviously possible but twig is really optimized for speed. I will say however the code isn't as elegant as it could be.
Thanks for the reply but I'm actually just looking at learning how for the experience and not really wanting to use it.
I would then advise you tear apart some of the standard templating systems available like smarty and twig to get understanding of where they are going.
There are a few steps: template, parsing the template and interpolate variables, caching
You may also want to include syntax for sub templates and how this is handled too.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)