1 Einträge mit diesem Tag
A common Project of every PHP-Developer is to write his own Templating System.
Templating in pseudo languages with weird syntaxes used to be very trendy and served the matter to draw a line between presentation logic and business logic.
It was also believed Templating-Languages would be a suitable replacement for plain-php, so Designers did not need to learn php. This turned out to be a huge error in reasoning, because usually Designers can code at all. (And if they claim they "can", they usually suck at it.)
Another common problem with Template-Systems is performance: Other files are parsed by php in the runtime using slow regex or maybe even reparsed with output buffering. Being a performance enthusiast it always bothered me that something is parsed and compiled by a language such as php, which is parsed itself, just for the sake of code-clearness. Usually they are not cached, and the set of functions is very limited (output this, loop that). If they're cached (e.g. Smarty) there are other Problems (just take a look at the "Cache-File"). Futhermore you as a developer need to learn a simpler templating language, which usually sucks. Debugging Template can be a pain, depending on which template System you use.continue reading „Templating Systems - a new hope“