Home arrow PHP arrow PHPLib Templates

PHPLib Templates

PHPLIB templates can grant you an amazing ability to abstract the manipulation of data (in the database as well as in PHP) from its final format, whether that format is HTML, XML, WML, or a formatted e-mail, and some of these ways will be explored here.

TABLE OF CONTENTS:
  1. PHPLib Templates
  2. Simplify
  3. Home is where the heart is
  4. Let's get started
  5. Dealing with blocks
  6. Nested blocks...
  7. Aren't we done YET?
  8. Closing
By: Benjamin D. Smith
Rating: starstarstarstarstar / 21
February 28, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
Hopefully, you've read Mr David Orr's introduction to working with PHPLIB templates. If you haven't, I recommend that you do so.
(http://www.phpbuilder.com/columns/david20000512.php3)

The most common use of templates is to allow you to change the look and feel of a site quickly without having to delve immediately into alot of PHP variable assignments and print statements.

And it's true that templates allow you to decouple your PHP code and the presentation HTML that's used to display its results but to limit PHPLIB templates to just this mundane chore would be a terrible disservice.

Used properly, PHPLIB templates can grant you an amazing ability to abstract the manipulation of data (in the database as well as in PHP) from its final format, whether that format is HTML, XML, WML, or a formatted e-mail, and some of these ways will be explored here.


There is usually an argument here about whether FastTemplates is really fast, or faster than PHPLIB, and which is better, etc.

I find that PHPLIB templates are more flexible than FastTemplate, don't require that you break nested blocks out into multiple files, and I don't really worry about performance that much, though I've been told that PHPLIB is also supposed to be faster, despite the other's name 'FastTemplate'.

This can almost get religeous, like arguing about using BSD vs Linux, or MySQL vs PostgreSQL, and I really don't want to get into that. Try both, and use the one you prefer:
FastTemplates http://www.thewebmasters.net/

Hopefully, in either event, this article will be useful to you =)



 
 
>>> More PHP Articles          >>> More By Benjamin D. Smith
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: