Recently I’ve noticed that wherever you go, whatever project you take a look at, 50% of them don’t take the path between PHP and HTML serious. They embed PHP directly in their HTML code.
Back when PHP was a little squishy language, it was merely considered a kind of template engine, and it was common practice to combine PHP and HTML in a single file. Now PHP has developed to a powerful scripting language, and it is now capable of performing even difficult computations with decent performance. This development of PHP results in more complex algorithms and thereby more code, and mixing this with HTML can produce a whole bunch of spaghetti code, and it is therefore considered bad practice. Because of this it is more usual to use what is known as template engines, whose goal is to make the transformation from PHP to HTML as smooth as possible.
The basic principle is to make an even simpler scripting language (than PHP) to mix with the HTML, and thereby increase the readability, and also give designers who do not know of PHP a chance to design with as much ease as possible.
Out on the template engine market, there are so many tasty engines to choose between (such as Smarty, PHPTAL, Rain TPL, XTemplate etc.). And even with a so big market, I still see serious projects which do not harvest the power this gives, why is this, can’t people get on? – are they stuck in the good old days?
TLDR; why doesn’t people use template engines?
(And... If you've understood the importance of Template Engines, which is your favorite?)