PHP Classes

These are really bad practices.

Recommend this page to a friend!

      PHP Classes blog  >  Why is it better to d...  >  All threads  >  These are really bad practices.  >  (Un) Subscribe thread alerts  
Subject:These are really bad practices.
Summary:The code samples here are really outdated and bad.
Author:Rafael M. Dohms
Date:2012-03-21 13:10:09
Update:2012-03-23 15:58:03
  1 - 10   11 - 11  

  11. Re: These are really bad practices.   Reply   Report abuse  
Paul - 2012-03-23 15:58:03 - In reply to message 10 from Manuel Lemos
This article is really poor.

You've completely missed the point of using objects and clearly only have a vague understanding of OOP yourself. You're not an expert and you shouldn't be writing authoratative articles that make yourself out to be one.

You get a lot of stuff plain wrong.

You mention the word inheritance but barely mention anything about it or what it can do. You don't explain encapsulation properly because you don't understand it, and you don't even mention polymorphism - one of the strongest reasons to actually use objects in the first place.

Objects are not simply containers for functions - yet you state explicitly that this is actually what they are for! Your code here is not even object oriented - just because you're using classes and objects doesn't mean you're writing object oriented code.

You made everything public and you also tied presentation into the objects themselves, making these objects completely impossible to port elsewhere.

You don't understand objects yourself, so you shouldn't be writing articles like this.

  1 - 10   11 - 11