Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can we use Template engine for Get-Simple need suggestion from GS Team
#14
Hello Carlos,

as for many things PHP for the Layout has its Pros & Cons.

Quote:The upside of it ...

~ The full power of PHP is available
~ No compiling
~ Error reporting is handled by PHP
~ No string parsing overhead
~ No regular expression overhead (this can be pretty expensive)
~ When using short tags, it actually looks like a template language.
~ PHP is easy to learn for simple procedural things like loops and variable output.

...and the downside

~ The full power of PHP is available (you might want to restrict access to the language)
~ Output is immediate (this can be overcome with output buffering.)
~ Templates need to be evaled if they reside in a database (or text file) - making debugging difficult
~ Template writers may need to be educated and learn some simple PHP
~ There will be a temptation to put more than display logic in the templates
Source: http://thephppro.com/articles/pte.php

My idea to use a TE along with GetEasy came while working with the GS Blog Plugin.
In Blog Manager >> Settings you can provide a custom Template.
But it contains all the heavy PHP stuff (logik) and makes it very dificult to focus on layout alone. And I am used to PHP, so that's not the issue.
I agree that PHP can be used for templating (and there are even Template Engines which use PHP and PHP only for Template Files like Savant3 or PHPTemplate/Drupal ).
Of course, you can make it even without a TE at all.

I mentioned above that I usually use the TWIG Template Engine which is a little bigger than RainTPL.
Fabien Potencier from SensoLabs/Symfony Project wrote an interesting article regarding "So, you think PHP is a templating engine? So did I... for a very long time....", shortly after he picked up and reworked the TWIG TE.

There are also Benchmarks on the above page covering many different TEs (and one of my reasons I use TWIG is its speed).

Please have a look.
I am open for communication and ideas.
And as I already said, I am not interested in a TE for the GetEasy Templates, but for its Plugins.

Kind Regards,
Serenado
Reply


Messages In This Thread
RE: Can we use Template engine for Get-Simple need suggestion from GS Team - by Serenado - 2012-12-22, 04:26:55



Users browsing this thread: 2 Guest(s)