Constructor vs Setter dependency injection

I have recently been involved in a debate about the quality differences between constructor and  setter dependency injection. In my opinion constructor dependency injection has multiple advantages over setter injection. Here are some reasons why. Reasons why constructor injection is to be preferred Objects must enforce their state We must try as much as possible continue>>


TDD “Aha !” moments

Robert C. Martin describes 3 very basic rules of TDD. These rules sound very simple. But as simple as they sound, as hard it is for a programmer to get into the Red-Green-Refactor TDD flow. I had many unsuccessful attempts, and, many times, TDD seemed stupid and time-consuming. But, as I kept trying, I had some revelations, continue>>


Decoupling your application from the framework

There are a lot of articles written on how to decouple a framework. There are methods to separate the presentation and persistence layer. But these are not the only things a framework can offer. For example, Symfony 2 provides a very nice process component, used for executing commands via the command line.