The repository pattern is one of the simplest patterns to implement in terms of code and abstraction complexity, but it is also one of the most misrepresented and misused concepts in real-world scenarios and applications. I’ll try to express my thoughts on this. The concept Let’s start with the repository concept. How it appears and […]
Design Patterns
Data Transfer Objects in PHP
DTOs (Data Transfer Objects) are common building blocks in object oriented programming. They are already present in some frameworks in various programming languages, with very different implementations and use cases. However, in PHP, we almost always use Data Transfer Objects to keep and transport data between application processes and layers. Martin Fowler first introduced the […]
Facade and Builder design patterns in PHP
Two more design pattern examples and quick explanations guys. Yes, I know, I promise that I’ll try to post more interesting stuff (and more often) in future articles, like “10 things you should know if you want to become a great developer”. Well guess what, good knowledge of the most common design patterns is definitely […]
The observer design pattern in PHP
The observer design pattern is a very common pattern in programming. The main idea behind it is creating a set of classes which will be most suitable to solve the issue of publish/subscribe kind of tasks. It is very possible that, working as a developer, you will come to a situation when one action of […]
Factory design pattern and its variations in PHP
One of the most used and most useful of all design patterns in software development is the factory design pattern. The factory belongs to the creational group of design patterns, so we can assume that we can use this pattern when our implementation classes are to complicated to be built in concrete use cases and […]
Strategy design pattern in PHP
Design patterns are usually one of the most interesting topics in software programming. Patterns, schemes, algorithms, they are software concepts and solutions for commonly occurring issues in software engineering which are created and designed to make the interaction between classes and objects better, smoother, more elegant and probably the most important, reusable. As interesting this […]