On Fri, 2004-05-14 at 16:13, George Lantz wrote: > I was just wondering if anyone had any good advice or tutorials on > building a simple template engine system. I am woking on a small project > that I would like to distribute, and I would of course like to separate > logic from html. I really just want to know the basics without caching. > I am familiar with Smarty and PHPLib and FastTemplate and some others. > But since I am going to be distributing the app, I would like it as > portable and small/simple as possible. Those template systems are > overkill for what I need. Really it does not even have to be a "Template > system", I would just like to here your thoughts on how you may have > accomplished separation of logic from output in a simple way.
If simple is what you want, then write your business logic into library files that you can include at the top of your source page. Then use functions which just output the content. As many will argue, PHP is a template engine in its own right, and for your simple purposes then it is probably perfect. Separation in this case just requires you keep your business logic in include files either as simple functiosn or as classes of related behaviour. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php