Article
What are the best practices in OOP?
Hi,
my best answer to your question would be giving you a list of bad practices – what you shouldn’t do:
Worst practices
This post enumerates some of the worst practices which you will have to be carefull NOT TO USE.
From the category of “do not even think to do this” here are some bad examples of code encountered:
Finder method returns Object
Problem: Depending on the number of occurrences found the finder method returns a number representing the number of occurrences – or! If only one found returns the actual object.
Recently added