Dependency is an object, a class needs to function. For example, if your class needs to log something using a logger object, that means it has a dependency on that object. Now, let’s see what Dependency Injection is. Many years ago, Martin Fowler wrote an article¹ that introduced the term Dependency Injection. It’s a technique, …
Tag: PHP
PHP coding standards in practice
Coding standards are guidelines about programming style and practices developers should follow when writing code. They usually cover indentation, white space, comments, naming conventions, etc. Moreover, coding standards are very important for producing consistent, readable and maintainable code, especially if you are part of a team. Remember the countless argues about tabs vs spaces? Well, …