Re: [Phpslash-devel] OOP & php programming style
Brought to you by:
joestewart,
nhruby
From: Peter C. <pe...@we...> - 2002-03-15 21:10:08
|
Hi > It can bog down a applciation with lots and lots of ectra calls and code > overhead for pedantic checking on everything that you do. > > Granted, in a perfect world this is most certianly the way to do things, > but in php, I think it tends to lead to very poor performance (unless you > throwdown the bucks for the Zend Compiler) and generally is a bitch to > maintain unless you designed this way from the start. > > -n > ages (and I do mean a long time) ago, when I were a lad and learning how to program in C, I was told to validate all data from outside the system (eg user input), but not to re-validate in internal calls. Obviously needs better debugging and testing I suppose, but leads to more efficient code. So - is it now best practise to validate all the way down? Even on calls to private methods and classes? (surely not) Just curious... Peter Peter Cruickshank *---------------- enter-activity |