free ebook and tutorial - Smarty, the compiling PHP template engine


















It is undoubtedly one of the most asked questions on the PHP mailing lists : how do I make my PHP scripts independent of the layout ? While PHP is billed as "HTML embedded scripting language", after writing a couple of projects that mixed PHP and HTML freely one comes up with the idea that separation of form and content is a Good Thing[TM]. Inaddition, in many companies the roles of layout designer and programmer are separate. Consequently, the search for a templating solution ensues.
In our company for example, the development of an application goes on as follows : After there quirements docs are done, the interface designer makes mockups of the interface and gives them to the programmer. The programmer implements business Logic in PHP and uses interface mockups to create skelet on templates. The project is then handed off to the HTML designer / webpage layout person who brings the templates up to their full glory. The project may go back and forth between programming /HTML a couple of times. Thus, its important to have good template support be cause programmers don’t want anything to do with HTML and don’t want HTML designers mucking around with PHP code. Designers need support for config files, dynamic blocks and other interface issues, but they don’t want to have to deal with intricacies of the PHP programming language

download

0 comments: