- Inheritance - the biggest misconception of OOP
Recently I had an interesting discussion on the subject I provoked in a post on the official "PHP Srbija” User Group Facebook page. Literal translation of the original post:
If I ever decide to be a teacher, first thing...
- Using 3rd-party code
We are privileged to use all the benefits of open source - plethora of useful frameworks and libraries that solve various kind of problems. Of course, we should be picky and use only test-covered and high-quality code libraries, hopefully with...
- Best practices for handling exceptional behavior
Dealing with exceptional situations is often neglected aspect of application development. For most, the first association of the notion is throwing/catching exceptions, but actually it is quite a broad topic.
Without further ado, I'll move to the point noting that developers...
- Use cases for anonymous classes
PHP 7 is becoming more and more adopted among developers, and we now enjoy using scalar and return type declarations, null coalescing operator, new error handling and other cool features that we were eagerly waiting for. There are already many...
- Using DIC the right way
DIC stands for Dependency Injection Container, which is a tool that manages the construction and wiring up of application services. It closely relates to the letter "D" of a SOLID acronym - Dependency Inversion Principle and is employed to facilitate...