Re: Separating content from style

From: Date: Wed, 09 Oct 2002 23:48:54 +0000
Subject: Re: Separating content from style
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-22301@lists.php.net to get a copy of this message
I agree that it is always good practice to use good design even for small projects, because they almost invariably turn into large projects if you don't. ;) This has been some great info. I appreciate it. Can someone explain what the purpose of a template engine is and possibly draw up a simple diagram of how one might work as it relates to DB-related projects? Thanks again for the great info. You guys rock! Thanks, Dave On Wed, 9 Oct 2002, Mark Nenadov wrote: > John, > > On October 9, 2002 04:29 pm, 1LT John W. Holmes wrote: > > One of the most popular template engines is Smarty. Search on google for > > it. There are plenty of others and even some modules that can be installed > > into PHP for faster performance. > > Yes, there are many. I typically use a very simple template engine that I > crafted myself. Performance usually isn't a problem, and if it is you could > always just make a minimal engine that will meet your needs (by sacrificing > features for speed). > > > YOu can easily seperate logic from presentation with PHP, but most people > > choose not to. For most simple projects out there, there's no reason to > > involve database abstraction and templating... > > Agreed. Well, there is at least *one* reason to involve templating and db > abstraction in simple projects. By using good practices for small projects, > there won't be so much temptation to slink out of them on larger projects! > > While sound design (abstraction, logic seperation, what not) may not yield as > many advantages in small projects, it is absolutely commendable to apply > "best practice" standards to all projects. > > Cheers, > > -- ,-._.-._.-._.-._.-. `-. ,-' .----------------------. | | | Cool nerds use ASCII | | | | art at the bottom of | | | | their emails. | | | | | ,';".________.-. | | ;';_' )] | | ; `-| | . T- | `----------------------._ \ | | `-; | | |..________..-| /\/ |________..| ,'`./ >,( | \_.-|_/,-/ ii | | ."' -/ .-"""|| | /`^"-; | ||____| / / `.__/ | || / | || | ||

« previous php.db (#22301) next »