Re: AW: [PHP] smarty
Ben said: But i don't see an alternative in your Example 3. Here was example 3 from my post: http://marc.theaimsgroup.com/?l=php-generalm=108145205519710w=2 $result = mysql_query (SELECT * FROM users WHERE id = '.$_GET[id].'); $row_array = mysql_fetch_array ($result); $name= $row_array[name]; $address = $row_array[address]; $state = $row_array[state]; $include(template.tpl); --- html body Name: ?=$name;?br Address: ?=$address;?br State: ?=$state;?br ... By the way, that's 2 files you're looking at; something like index.php and template.tpl. Looks rather templaty, dontcha think? PHP was originally intended to be a template engine (or so I've been told). I hate that coding mixed up with the rest of HTML/CSS. Me too, which is why I went to Smarty, but then I realized I could do the same thing without Smarty. Not that Smarty is bad (I'll probably use it in the future) but I don't *need* it to separate business and presentation logic and neither do you. For further separation of design from markup, check out CSSZenGarden.com for about 200 amazing designs done entirely with CSS. Seems there's no limits to the design capabilities of CSS, including replacing HTML tables and img tags. Ultimately you could separate your entire website into CSS for design, HTML for the markup of the data, PHP for getting the data, etc. Very nice. It may be fact, that the perfomance could get worse a bit when using smarty* but since your not coding sth. for a high traffic site the usability of code is more important than that little peace of loss in performance. I agree. The ease-of-use that templating affords is a good tradeoff for the slight performance hit. Smarty does precompile the PHP and offers caching, which helps... it's probably similar in performance to the native PHP template method described above. With native PHP I can use buffering and Zend and other native performance goodness so native PHP is almost certainly going to be faster in nearly every case. Just my guess. Overall, I'd use Smarty when I want to get the extra functions and widgets in one library. It's a great tool. /dev/idal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
I don't see why you keep persisting this thread. Smarty is a cool tool and lots of people use it. You have decided NOT to use it. So why keep going on; you not like Smarty; are you encouraging users not to use Smarty. I don't see your point at all !!! There's more than one way of skinning a cat ! pete Chris De Vidal wrote: Ben said: But i don't see an alternative in your Example 3. Here was example 3 from my post: http://marc.theaimsgroup.com/?l=php-generalm=108145205519710w=2 $result = mysql_query (SELECT * FROM users WHERE id = '.$_GET[id].'); $row_array = mysql_fetch_array ($result); $name= $row_array[name]; $address = $row_array[address]; $state = $row_array[state]; $include(template.tpl); --- html body Name: ?=$name;?br Address: ?=$address;?br State: ?=$state;?br ... By the way, that's 2 files you're looking at; something like index.php and template.tpl. Looks rather templaty, dontcha think? PHP was originally intended to be a template engine (or so I've been told). I hate that coding mixed up with the rest of HTML/CSS. Me too, which is why I went to Smarty, but then I realized I could do the same thing without Smarty. Not that Smarty is bad (I'll probably use it in the future) but I don't *need* it to separate business and presentation logic and neither do you. For further separation of design from markup, check out CSSZenGarden.com for about 200 amazing designs done entirely with CSS. Seems there's no limits to the design capabilities of CSS, including replacing HTML tables and img tags. Ultimately you could separate your entire website into CSS for design, HTML for the markup of the data, PHP for getting the data, etc. Very nice. It may be fact, that the perfomance could get worse a bit when using smarty* but since your not coding sth. for a high traffic site the usability of code is more important than that little peace of loss in performance. I agree. The ease-of-use that templating affords is a good tradeoff for the slight performance hit. Smarty does precompile the PHP and offers caching, which helps... it's probably similar in performance to the native PHP template method described above. With native PHP I can use buffering and Zend and other native performance goodness so native PHP is almost certainly going to be faster in nearly every case. Just my guess. Overall, I'd use Smarty when I want to get the extra functions and widgets in one library. It's a great tool. /dev/idal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
pete M wrote: There's more than one way of skinning a cat ! Hydrochloric acid works real well. ;) -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ ' \ * 737 Main St. * * |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150 * * |___/ * Buffalo, NY * * http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
pete M said: Smarty is a cool tool and lots of people use it. You have decided NOT to use it. I don't believe you've read a word I've written. I've been trying to tell people like myself that one can easily template with PHP. I thought I *needed* Smarty or any nice templating engine to seperate business and presentation logic; I was wrong. I was ignorant and perhaps there are others like me. I've also been saying that I'll probably use Smarty in the future. Advantages: numerous time-saving built-in functions, performance (debatable) Disadvantages: must learn yet another language and work with that language's shortcomings. I never said I've decided NOT to use it. I've never said it wasn't a cool tool. Please read carefully. /dev/idal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Could we please close the thread already? I think in the previous week there's been everything said what there's been to say. whoever is still interested in reading the same arguments over and over should please take a look at the archives. I value the opinion of every poster if (s)he has something to contribute - but contribution also includes adding something not already present in abundance. ... and I really don't want to killfile any members of this list. Thanks Richard PS: sorry if it sounds kinda pissed. Friday, April 16, 2004, 4:10:20 PM, you wrote: pete M said: Smarty is a cool tool and lots of people use it. You have decided NOT to use it. I don't believe you've read a word I've written. I've been trying to tell people like myself that one can easily template with PHP. I thought I *needed* Smarty or any nice templating engine to seperate business and presentation logic; I was wrong. I was ignorant and perhaps there are others like me. I've also been saying that I'll probably use Smarty in the future. Advantages: numerous time-saving built-in functions, performance (debatable) Disadvantages: must learn yet another language and work with that language's shortcomings. I never said I've decided NOT to use it. I've never said it wasn't a cool tool. Please read carefully. /dev/idal -BEGIN PGP SIGNATURE- Version: PGPsdk 2.0.5 Copyright (C) 2001 Networks Associates Technology, Inc. All rights reserved. Comment: iQA/AwUBQH/ti0LEeLYDwe5mEQKW2ACeKc1lBSCJe4x8cMmbjt6Fii87koQAnRHl q70qB+EHK8HlwhVnCok+wfTm =NyMA -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
BIG_SNIP / It seems the discussions wents in a completely nonsense direction. Arguing about TE's in general and one concerete TE named smarty is simply silly. Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. So lets split the thread into the two different topics and talk about them separately. Instead arguing apples are tasting better than bananas since because of the different color is simply nonesense. cu -- - Enrico Weigelt== metux IT services phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: [EMAIL PROTECTED] cellphone: +49 174 7066481 - -- DSL-Zugang ab 0 Euro. -- statische IP -- UUCP -- Hosting -- - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: AW: [PHP] smarty
Enrico Weigelt mailto:[EMAIL PROTECTED] on Friday, April 16, 2004 10:13 AM said: keep in mind it's friday!! Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. don't forget interjinn. So lets split the thread into the two different topics and talk about them separately. Instead arguing apples are tasting better than bananas since because of the different color is simply nonesense. actually i think bananas are better because of their shape. ... wait. i think that came out wrong. chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
Chris W. Parker wrote: Enrico Weigelt mailto:[EMAIL PROTECTED] on Friday, April 16, 2004 10:13 AM said: keep in mind it's friday!! Then why am I still sober? Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. don't forget interjinn. Like we ever could. (awaits the flame) So lets split the thread into the two different topics and talk about them separately. Instead arguing apples are tasting better than bananas since because of the different color is simply nonesense. actually i think bananas are better because of their shape. I won't touch that with a ten foot banana. wait. i think that came out wrong. Better than going in wrong. (Isn't it 5:00 yet???) -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ ' \ * 737 Main St. * * |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150 * * |___/ * Buffalo, NY * * http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
On Fri, 2004-04-16 at 13:27, John Nichel wrote: Chris W. Parker wrote: Enrico Weigelt mailto:[EMAIL PROTECTED] on Friday, April 16, 2004 10:13 AM said: keep in mind it's friday!! Then why am I still sober? Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. don't forget interjinn. Like we ever could. (awaits the flame) John WHY ARE YOU SUCH A F... Ok, I'm willing to let bad blood go away if you are. We're all PHP peeps here so really there shouldn't be any animosity (perceived or otherwise). 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
RE: AW: [PHP] smarty
don't forget interjinn. Like we ever could. (awaits the flame) John WHY ARE YOU SUCH A F... Ok, I'm willing to let bad blood go away if you are. We're all PHP peeps here so really there shouldn't be any animosity (perceived or otherwise). Damn. Some of the best entertainment of my week on this list ;) *home simpson voice* m beer. Enjoy all. A -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
Aaron Wolski wrote: don't forget interjinn. Like we ever could. (awaits the flame) John WHY ARE YOU SUCH A F... Ok, I'm willing to let bad blood go away if you are. We're all PHP peeps here so really there shouldn't be any animosity (perceived or otherwise). Damn. Some of the best entertainment of my week on this list ;) *home simpson voice* m beer. Enjoy all. A You should try the qmail list. -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ ' \ * 737 Main St. * * |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150 * * |___/ * Buffalo, NY * * http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. Wait a minute... are we talking about Smarty as in smarty.php.net? Because I was thinking of something else this entire time and this completely changes the discussion... ---John Holmes... ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] smarty
John W. Holmes wrote: Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. Wait a minute... are we talking about Smarty as in smarty.php.net? Because I was thinking of something else this entire time and this completely changes the discussion... ---John Holmes... ;) There's a smarty.php.net? No wonder I was getting so confused going to www.smarty.com serious You do realize that with 2.5 hours left in the work day today, we're likely to get even sillier? ;) /serious -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ ' \ * 737 Main St. * * |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150 * * |___/ * Buffalo, NY * * http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: AW: [PHP] smarty
John Nichel mailto:[EMAIL PROTECTED] on Friday, April 16, 2004 11:24 AM said: serious You do realize that with 2.5 hours left in the work day today, we're likely to get even sillier? ;) /serious I still have 6 hours to go. :( c. p.s. anyone play ffxi? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php