Jump to content

Template Engine


ionik

Recommended Posts

Ok,

 

Well I have finally finished the backend for something I have been developing 2 months work and after hundreds of cups of coffee, couplea cartons of cigarettes, and 10's of thousands of lines of code, I come to the building the frontend....and I'm trying to come to a solution on the template engine.

 

Now, what would be a good recommendation for a template engine.

 

Some input on this would be appreciated.

 

Right now I'm deciding on going XML files or Tpl files.

 

Now there are advantages and disadvantages to both, XML I could have a template editor built into the Administration with less effort, Tpl files are easier for less experienced designers / developers or whoever to understand.

 

What I would like to know is what do some of you prefer XML or TPL?

 

I have allready built a TPL and XML template class handler and both perform at a suitable rate for me.

 

Which do you think is more efficient?

 

Or possiable another efficient stable and secure way of parsing templates.

 

 

Link to comment
Share on other sites

i tend to avoid XML all together, generally out of personal preference and to keep things simple. I also have some doubts about performance when compared to using simple templates.

 

take a look at a similar topic posted not so long back, especially at the link in Reply #4:

 

http://www.phpfreaks.com/forums/index.php/topic,190065.0.html

 

 

Link to comment
Share on other sites

Allow the user to choose their template style.  If you already have a class for each, then when the user is entering their template have them select which of the two the template should be retarded as.  Done and done.

Link to comment
Share on other sites

that could be a solution but then it would take alot more effort to do that as XML handle class and TPL are completely different....I've decided to just run .PHP files as the standard template less overhaul I need to worry about and doesn't limit the flexibility of templates and i can still perform all the caching I need.

 

I read up on this for 2 days now and it doesnt make since trying to make it easier on other developers or users wanting to make templates, PHP is not complex if users dont want to make their own templates using PHP they can come back and pay me to do it simple.

 

Thnx for the replies!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.