Dependency Injection and Design Patterns in Real Life - Code Repository
This is the code repository for the WordCamp Europe 2018 Workshop "Dependency Injection and Design Patterns in Real Life" presented by David Mosterd and Alain Schlesser.
You know a lot of pattern buzzwords and OOP syntax, but fail to get actual benefits out of their practical use? You’ve read about principles and best practices but cannot apply them to your daily problems? We’ll work on a simple WordPress plugin to discuss fundamental principles like dependency injection and discover useful design patterns that solve real pain points in your development work. We’ll combine these techniques to give you strategies to better deal with ever-changing requirements.
This workshop assumes solid knowledge of PHP and basic knowledge about classes and objects, how the PHP OOP syntax works and what the notions of polymorphism, encapsulation and inheritance mean.
Slides are available at https://schlessera.github.io/wceu-2018/.
We assume a clean WordPress installation with a standard WordPress theme like TwentySeventeen. If you have any questions about the steps below, just ask us and we will help you.
First, install and activate the Gutenberg plugin from the WordPress repository.
Second, clone these plugins to your local computer from within the wp-plugins folder:
git clone https://github.com/schlessera/wceu-2018-code/ git clone https://github.com/schlessera/wceu-2018-resources/
Third, run composer in both the roots of these plugins:
And last, activate these plugins.
After that we will explain what's next.