Skip to content
mikeseghers edited this page Sep 4, 2014 · 1 revision

Why?

People often ask us, "But why?". We understand this question. The idea of integrating a project with a third party framework such as Reliant might seem daunting. We refer to stackoverflow on the necessity of DI in Objective C/Dynamic languages.

We decided to create this framework because we were used to a highly decoupled infrastructure in other languages thanks to DI. Decoupling code has been a hot topic ever since object oriented programming came around. Looking at the typical design pattern to solve the loose coupling problem, the Abstract Factory pattern is one of the most well known solutions. Although factories decouple the code from actual implementation details, pure loose coupling is never reached, since you still have a dependency to a factory in almost all classes in your project. That's a rather large footprint in our humble opinion.

A better solution exists in the principles of DI. Dependency injection has been described as a 25-dollar term for a 5-cent concept. And indeed DI is a 5-cent concept in that it is not expensive to implement if a good DI container is at hand. The term was invented by Martin Fowler, and as we all know, Martin Fowler never lies!

Before starting this library, we looked for opinions about DI in dynamic languages at the one hand, and in frontend driven solutions at the other hand. We asked ourselves what a good DI container should do, and especially, what it should not do. Reliant is our answer to these questions.

Clone this wiki locally