Re: All-in-one PHP Classes
| From: | Chris | Date: | Tue, 06 Feb 2007 22:59:15 +0000 |
| Subject: | Re: All-in-one PHP Classes | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-248452@lists.php.net to get a copy of this message | ||
Roman Neuhauser wrote:
# user@internet46.fr / 2007-02-06 12:47:47 +0100:Pfft. Depends on the code. A developer api is going to have long methods / functions, simply because of error checking.Have been reading posts daily for two months now on the list, and am very pleased at how informative these can be. I have noticed, many examples where one is pointed to using classes downloadable on the internet.This is when i realized how often these classes that do "everything" are very BIG.Big classes and long methods are signs of bad code, no matter if it's downloadable for free or costs money.
I'd have to agree with that being extremely bad. My biggest class has maybe 30.Here, it's the programmer who is confronted with loading huge files into memory to use just one perhaps two function in a 300+ functionality class..what's a "300+ functionality class"? One having more than 300 public methods? Where can I see it? Such a beast could be legit (hard to tell without knowing more), but it's probably a result of incompetence.
Where possible, yes. -- Postgresql & php tutorials http://www.designmagick.com/Shouldn't these classes be perhaps broken down into usefull "parts".Definitely.