PHP 5 Objects, Patterns, and Practice

Author: Matt Zandstra
All Stack Overflow 8


by anonymous   2017-08-20

You only have one thing right with OO. The $connection object.

Everything else is procedural. You should start by creating a class, instead of all those loose functions in "dbfunctions.php".

Also note that you should avoid mixing logic code with HTML. It gets hard to maintain.

Here's probably the best book you can read on the subject .

It's not easy to get into object oriented paradigm. But when you get it, it's like riding a bicycle. You never forget.

by anonymous   2017-08-20

You might find investigating design patterns helpful. The composite pattern is often used in this situation. A good book to help you with design patterns with php oo is Matt Zandstra's PHP Objects, Patterns and Practice

by anonymous   2017-08-20

My favourite book on OOP for PHP, very good!