Re: PHP object oriented problems

by "Lara J. Fabans" <lara(at)lodestone-sw.com>

 Date:  Fri, 27 Jul 2001 08:13:27 -0700
 To:  <hwg-languages(at)mail.hwg.org>
 References:  demon janman
  todo: View Thread, Original
At 07:35 PM 7/27/2001 +0530, Srinivasan Ramakrishnan wrote:
>Read the PHP manual. I find the manual quite sufficient for all my needs. If
>you meant that you were new to object oriented programming, then
>
>a) Start learning Java or C++ (would recommend Java for learning OOP)
>or
>b) Don't use OOP in PHP, most PHP programmers don't use them, not frequently
>anyway. OOP is not idiomatic in PHP.

I would respectfully disagree.  You don't need to learn another language to 
learn OOP
nor should you NOT use OOP in PHP.  Of my last five PHP projects, four used 
OOP.
(the first one didn't because there was only me, and I didn't know 
enough).  OOP provides
a wonderful structure both for thinking through the architecture as well as 
clearer code
for when multiple people are working on the project.  It's also easier to 
test your stuff as
units without breaking other people's code.

I'd recommend buying some books.  MySQL/PHP Database Applications by Jay 
Greenspan
and Brad Bulger is PHP specific.  If you're interested in objects, The Art 
of Objects by Lau
or Building Web Applications with UML by Conallen are both well written, 
and not so obtuse
like a lot of the OOP books out there.

But the best way to learn is write code, write code, and then write some 
more code :-)

Lara
---------------------
Lara J. Fabans
Lodestone Software, Inc
lara(at)lodestone-sw.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA