Re: OOP
| From: | 1LT John W. Holmes | Date: | Wed, 15 Jan 2003 19:24:27 +0000 |
| Subject: | Re: OOP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131738@lists.php.net to get a copy of this message | ||
> I've been doing a little OOP lately and have a few questions.
> I want to build an application, there a re lots of elements to the
> application: Authentication, Database, Presentation, Error Handling etc.
>
> Now, I want to code this cleanly and make it reusable. So, a class for
each of
> these elements would be a good idea? Say I have an Authentication class.
It
> has to run on it own. Should I build database, error methods into each of
my
> classes? That seems to defeat the point in the first place?
>
> At the moment I seem to struggling with how to do somthing right and well,
> rather than the actual code.
I'd recommend you make a separate database class and error class that each
of your other classes access. That would make it the most modular and
re-usable.
---John Holmes...