Many times, when working with smaller projects, taking the time to separate the presentation from logic is like taking the time to ask guests to leave the dinner table each time a new dish is brought from the kitchen to hide where its coming from. Some programmers have said if lines of code are greater than 1000, go ahead and separate the two. There's no question that projects that are going to involve 100% database stored content can benefit from creating HTML templates and parsing data through them with PHP and the FastTemplate class. Remember that there are many tools for separating presentation and logic and the best one for the job is the one that's desired. Make certain you have the right one before the project gets too deep.
When installing PHP4 and FastTemplate, it was necessary to edit a line of code in the FastTemplate class in order for it to work properly.
The curly brackets had not been escaped in the code so the
script ignored any variables in the HTML templates.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |