|
Posted by Dikkie Dik on 05/15/07 20:39
> I think learning OOP in PHP causes bad habits. There are too many
> different ways to do it. If you learn from a language like Java, you
> will certainly get it down very well. PHP5 has many of the features of
> Java OOP (not all of them, though).
On the contrary. Java also has quite a few unwanted characteristics as
an OO language. I agree that Eiffel would be a better place to start,
but it remains abstract, as it is hardly used. Also, PHP programmers
often have to learn javascript as well, so you gain an understanding of
both class-based and template-based object orientation.
I think the "bad habits" are a good thing to start from. As a resource
on how to learn OO programming, I would also recommend "Refactoring" by
Martin Fowler. The examples alone in that book can teach you as much as
a good theory book.
I think PHP offers you the opportunity of gently discovering the
advantages of objects. In fact, a lot of people only need to realize the
power of a component like PHPMailer or FPDF to give abstract words like
"code reuse" a firm body.
Best regards
Navigation:
[Reply to this message]
|