Composition vs. inheritance in PHP

Inheritance. One of the four fundamental concepts in object oriented programming, by the book. Inheritance, encapsulation, polymorphism and abstraction. But, as you may have noticed, this concept is becoming increasingly unpopular as a useful concept in modern programming, particularly when it comes to maintaining large code bases for projects that last for years and have […]

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 […]

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 […]

Handle your exceptions by using global exception filter in a NestJS application

NestJS is a very modern and very powerful Node.js framework which offers enjoyable development experience. It is originally developed by Kamil Mysliwiec, it is heavily inspired by Angular and it rising up in popularity very quickly and for good reasons: Gives a great flexibility because of the completely modular architecture and the ability of using […]