Groovy Inversion Of Control & Unit Testing (IOC)

By adding IOC all objects are instantiated by Dependency Injection i.e. they are injected into each constructor by the IOC factory. So we can switch multiple implementations in without changing code. Formally: the code calling an object is not responsible for instantiating the object, so you would never use def blah = new Blah() 1.… Continue reading Groovy Inversion Of Control & Unit Testing (IOC)

Local cache implementation while developing

The brilliance of abstracting out implementations from built in framework is sometimes underestimated. In the following example I create my own implementation of ICacheProvider which gives me centralized control as well as the ability to be able to switch in different implementations. So while I am developing (building/rebuilding etc.) I use an implementation that saves… Continue reading Local cache implementation while developing