www.webdeveloper.com
Results 1 to 4 of 4

Thread: Finding a Template Engine tutorial

  1. #1
    Join Date
    Jul 2010
    Location
    Texas
    Posts
    76

    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
    http://www.codewalkers.com/c/a/Displ...System-in-PHP/
    http://www.devarticles.com/c/a/MySQL...-Class-In-PHP/

    Thanks

  2. #2
    Join Date
    Aug 2010
    Location
    Chesterfield, UK
    Posts
    15
    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.

  3. #3
    Join Date
    Jul 2010
    Location
    Texas
    Posts
    76
    Thanks for the reply but I'm actually just looking at learning how for the experience and not really wanting to use it.

  4. #4
    Join Date
    Aug 2010
    Location
    Chesterfield, UK
    Posts
    15
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles