Object-oriented programming levelled up!
Download the latest release.
Object-oriented programming and its principles help you to organise your code and to design the logic of applications. Unfortunately, using those principles also forces you to make design choices which are not always optimal or natural. Inheritance is the most common of these principles. Despite providing flexibility, inheritance also has constraints and issues. Composition is an alternative to inheritance and fixes some of those issues.
In this deep and low-level presentation, we explore the pros and cons of each approach. It contains PHP code examples and UML diagrams, but fear not, as we are using trivial examples.
There is no prerequisite (not even PHP knowledge) to follow/read this presentation, maybe just some bravery and humour.
nix build
open result/latex-presentation.pdf
- https://www.infoworld.com/article/3409071/java-challenger-7-debugging-java-inheritance.html
- https://www.guru99.com/object-oriented-programming.html
- https://en.wikipedia.org/wiki/Object-oriented_programming
- https://www.php.net/manual/en/language.oop5.inheritance.php
- https://www.phptutorial.net/php-oop/php-polymorphism/
- https://blog.devgenius.io/code-smell-58-yo-yo-problem-1e092d3c69ff
- https://www.phptutorial.net/php-oop/php-inheritance/
- https://neethack.com/2017/04/Why-inheritance-is-bad/
- https://www.indeed.com/career-advice/career-development/what-is-object-oriented-programming
- https://www.thoughtworks.com/insights/blog/composition-vs-inheritance-how-choose