Re: OOP in web development
| From: | Kath | Date: | Tue, 13 Feb 2001 20:11:46 +0000 |
| Subject: | Re: OOP in web development | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39474@lists.php.net to get a copy of this message | ||
I find the ability to write something once (say a mysql_connect();
statement) and be able to run it on any page just with $db->connect(); is
pretty cool.
While that may not seem cool, if you some day change a a PHP statement that
exists on many pages, this lets you change it in one place, instead of
having to copy it to dozens of other places.
Also, what happens if you change your database password and now need to
change a bunch of pages to have the new password?
Problem solved in OOP, because the vars are all in the same file.
- Kath, a recent converter to OOP, but enjoying every minute of it!
----- Original Message -----
From: "Joe Sheble (Wizaerd)" <JustForMailingLists@wizaerd.com>
To: <php-general@lists.php.net>
Sent: Tuesday, February 13, 2001 11:41 AM
Subject: [PHP] OOP in web development
> I've been using PHP for over a year now and have been successfully running
> three different websites developed with PHP, but I've never done anything
> with classes or objects. Even when returning data from a mySQL database,
I
> use mysql_fetch_array() instead of mysql_fetch_object().
>
> What am I missing by not using objects and classes, other than
> reusability? What are the real benefits to using OOPs in PHP?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>