Re: All-in-one PHP Classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-02-07 at 09:59 +1100, Chris wrote:
> Roman Neuhauser wrote:
> > # user@xxxxxxxxxxxxx / 2007-02-06 12:47:47 +0100:
> >> 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.
> 
> Pfft. Depends on the code.
> 
> A developer api is going to have long methods / functions, simply 
> because of error checking.
> 
> >> 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.
> 
> I'd have to agree with that being extremely bad. My biggest class has 
> maybe 30.

I have a base class that most of my components extend that has 90
methods. It could go elsewhere or be broken up into smaller pieces, but
why bother, then I'd have to spend more cycles loading the individual
pieces... and quite frankly I'm too lazy to bother :) Most of them wrap
PHP functionality or do framework localization.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux