Template-Based Web Development With patTemplate (part 2) - Endgame (
Page 14 of 14 )
And
that's about it for the moment. In this article, you learned about some of
patTemplate's more advanced features, including the ability to assign and use
global variables, to dynamically switch templates on and off, and to create
conditional templates which mimic the "switch" family of conditional statements.
You also put your new-found knowledge to the test with a couple of real-life
examples, using the template engine to dynamically generate Web forms and to
gracefully recover from errors in script execution.
That's about it for
this tutorial. I hope you enjoyed it, that you learned something useful from it,
and that it encouraged you to look at patTemplate as a viable, more efficient
alternative to the traditional way of constructing a PHP Web application. Be
good, and I'll see you soon!
Note: All examples in this article have been
tested on Linux/i586 with Apache 1.3.20 and PHP 4.1.0. Examples are illustrative
only, and are not meant for a production environment. Melonfire provides no
warranties or support for the source code described in this article. YMMV!