Re:RE: The problem with Smarty
| From: | Peter Bowyer | Date: | Mon, 18 Feb 2002 07:47:34 +0000 |
| Subject: | Re:RE: The problem with Smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2719@lists.php.net to get a copy of this message | ||
At 04:17 PM 2/17/02 -0600, Monte Ohrt wrote:
I could show some examples of extending the class, but normally I'd think that this is outside the scope of Smarty. This is a fundamental programming concept, functions are not the only thing modular and reusable, so are classes. As a PHP developer you would want to extend ANY class libraries you incorporate, not just Smarty!Unless they're part of PEAR when you're expected to use them as is :-( Seriously, you're right, but OO programming is hard to grasp at first *and* there are no decent guides for PHP. I learned what I know by playing with classes while writing a couple (sticking $this-> in different places and seeing what happens!) and found that to be the best way. The difference lies I guess in those who have been taught programming at college or University, and those of us who have picked up PHP as our first language by following a book or two and a lot of coding. This split is going to become much more pronounced when PHP5 and its new OO features come out - it may be clear to others how to use them but I haven't a clue!
What sucks is that I see a lot of poor programming practice in online examples and even published PHP books, which only encourages the poor programming practices of those that read them. :(Agreed. Do you know of any books that show you the "best" way to do different tasks for PHP, and explain which way would be quicker (eg using strcomp instead of preg, md5 vs crc32). I've got the cookbook which is good as far as it goes, but it's still more of a "how to" rather than a "why do it this way" book.
If someone had the time, they could create a Smarty "User Guide" which would cover Smarty and all these programming concepts in conjuction with Smarty. How to setup a working scalable development environment, how to port apps to Smarty, etc.I'm game to do some of the work, so long as there's no deadline (the next piece of free time I have is at the beginning of July after exams (-: ). Who else is willing? Cheers! Peter. ---oOo--- sendcard - *The* PHP e-card solution http://sendcard.sf.net ---oOo---