The Smarty templating system is probably the best known and most used on the Internet. It provides the following benefits:
Designers can’t break application code. They can modify the templates all they want, but the code stays intact. Consequently the code is tighter, more secure, and easier to maintain.
Errors in the templates are confined to Smarty’s error-handling routines, making them simple and intuitive to deal with.
With presentation in its own layer, designers can modify or completely redesign a web layout from scratch—all without intervention from the programmer.
Programmers can go about maintaining the application code, changing the way content is acquired, and so on, without disturbing the presentation layer.
Templates are a close representation of what the final output will be, which is an intuitive approach.
Smarty has many security features built in so that designers won’t breach security and you won’t open your server to the execution of arbitrary PHP code.
But separating the application code from the presentation layer doesn’t mean that the logic is also separated, because Smarty offers comprehensive presentation logic features, too, as you’ll see later.