https://www.zend.com/blog/tips-php-security
https://designpatternsphp.readthedocs.io/
https://docs.phpdoc.org/index.html
By Robert C. Martin in 1995, named by Michael Feathers
- S - Single-responsibilty principle ** A class should be responsible for one thing. ** That does not mean single task. ** Small class with specific names and responsibilty. ** Find one reason to change and take everything else out of the class.
- O - Open-close principle
- L - Liskov substitution principle
- I - Interface segregation principle
- D - Dependy Inversion Principle
https://www.youtube.com/watch?v=GtZtQ2VFweA https://www.youtube.com/watch?v=Q61TtJlWvfE
- Don't try to rebuild a whole project when editing it. Instead, leave it cleaner than you found it.
- Code should do what it is supposed to and nothing else.
- If you only have one type then an interace is not needed. IT helps to extend without need to modify.
- You ain't going to need it.
"Your code sucks, let's fix it - By Rafael Dohms"
ITT 2016 - Kevlin Henney - Seven Ineffective Coding Habits of Many Programmers
https://en.wikipedia.org/wiki/Dependency_injection https://www.youtube.com/watch?v=RlfLCWKxHJ0 law of delimiter, DI, testing, etc. Inject dependencies into properties https://php-di.org/doc/autowiring.html Autowiring
https://floating-point-gui.de/languages/php/
"be conservative in what you send, be liberal in what you accept" https://en.wikipedia.org/wiki/Robustness_principle
Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.
https://en.wikipedia.org/wiki/Unix_philosophy
Tony Hoare https://www.youtube.com/watch?v=ybrQvs4x0Ps
https://martinfowler.com/articles/practical-test-pyramid.html