Re: Re: Validation class comments
| From: | Pierre-Alain Joye | Date: | Wed, 29 May 2002 17:27:42 +0000 |
| Subject: | Re: Re: Validation class comments | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6615@lists.php.net to get a copy of this message | ||
On Tue, 23 Apr 2002 17:01:18 -0300
Manuel Lemos <mlemos@acm.org> wrote:
> Hello,
>
> On 05/29/2002 04:48 AM, Pierre-Alain Joye wrote:
> >>That is all nice and dandy in theory but in practice that is not a
> >>good idea in PHP.
> >
> > I am an idealist ;).
>
> You are a the theory guy! :-)
huh ;).
> Easier? When simple programs exhaust your computer memory by loading
> much more code than it is necessary, what you think is making your
> life easier is indead an headache.
The eternal conflict between different models.
> You must not forget that PEAR is just not for you.
Hope I will never forget that point.
> Whatever is your budget for hardware may be something out of reach for
> users that can't invest that much on hardware.
Maintening codes cost anyway more than buy disks or ram, in india as
well in EUR, unmaintable code cost, pfiuuu, forget it :).
> Anyway, RAM abuses will hit you as well when you tro scale your
> software to attend the needs of a busy site when you need to fork much
> more processes to keep up with the demand of HTTP requests.
Sure, always trying to find a good compromise, not easy often, but that
works. Btw I like the last article from John Lim about optimizing php
;).
> Dynamic loading as a very high an execution overhead price because it
> requires that Zend compiler goes through the included code again.
>
> That is a very high price to load too small components, even more when
>
> they are needed frequently.
As far you consider we will make tousands of files, sure :).
> >>Many PHP class libraries like a lot that exist in PEAR has the same
> >>viral interdependency. Maybe you have not noticed this, but I am
> >>afraid that soon or later PEAR classes will be associated with
> >>bloatware
> >>precisely due to excessive interdependency.
> >
> > IMHO, I consider there is too much code duplication. As far I decide
> > to use differents modules, I do not want to make changes to any
> > little kind of functions just because they duplicate
> > functionnalities around all the modules.
>
> Most types of validation only require as little as 2 lines of code. It
>
> does not make much sense to modularize such a small amount of code.
Exactly, exploding a 400+ lines methods is certainly not an excessive
modularity ;).
> I don't think that it is that black or white. It depends. Duplicating
> small amounts of code is no big deal.
Nothing is B&W, except B&W ;)
Really appreciate any remarks you should have about our Validate module,
ideas, methods or anything you think usefull.
pa