|
Posted by Jerry Stuckle on 11/08/07 04:29
NC wrote:
> On Nov 7, 6:11 am, firewood...@yahoo.com wrote:
>> I need some help in furthering my education in OOP.
>> I have developed a set of PHP scripts that I use in
>> a fairly sophisticated database driven website, but
>> I am not proud of the rather amateurish programming
>> that I used to create the functionality. Although
>> I use classes and objects to organize my data and
>> their related functions, it seems to be only marginally
>> better than plain procedural programming.
>
> In fact, it is probably worse than procedural programming; using OOP
> creates substantial overhead (initializing objects requires CPU cycles
> and memory that would not be used if the code were procedural).
>
Properly done, OOP does not create any significant overhead. After all,
even in procedural programming you should initialize your variables.
>> The next step, it seems to me, is to become much more skilled in
>> analyzing a program from an OOP point of view and learning the
>> techniques for organizing the structure of the scripts and how to
>> implement them in a website. In other words, I want to move from
>> amateur to pro in terms of both career and technique.
>
> If you want to do it in PHP, you need to start by learning the limits
> of OOP. PHP developers often face a trade-off between development
> time and application performance; code developed quickly (usually,
> using an object-oriented framework) requires more system resources to
> run, while code that runs fast has to stay away from all kinds of
> abstraction, including OOP.
>
PHP is not good for learning OOP. And OOP does not require any
significant additional resources, when done properly.
>> Can someone point me in the direction of the right schools(online),
>> books, websites, example code, or other assets that I can use to
>> learn?
>
> Read up on patterns. Note, however, that these days, most books on
> patterns are written with Java in mind.
>
Which isn't a bad language to learn OOP. It is, however, heavy on
resources. But that is the language - not OOP.
>> Also, is PHP the best language to use to learn and implement
>> the full power of OOP?
>
> Definitely not. PHP is the best language to learn deficiencies of
> OOP. :)
>
I agree it's not the best language to learn OOP. But that's because it
doesn't implement a proper OO model.
>> If not, any suggestions?
>
> C++ and Java.
>
> Cheers,
> NC
>
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|