Tag Archives: design principle

Inversion of Control (IoC) and Dependency Injection (DI)
“Inversion of Control is a generic design principle of software architecture that assists in creating reusable, modular software frameworks that are easy to maintain.” It is a design principle in which the Flow of Control is “received” from the generic-written library or reusable code. To understand it better, in procedural/traditional languages, the business logic generally controls the flow of the application and “Calls” the generic or reusable code/functions. For example, In a simple Console application, my flow of control is controlled by my program’s instructions, that may include the calls to some general reusable functions. In Contrast, in IoC, Frameworks are the reusable code that “Calls” the business logic. print (“Please enter your name:”); scan (&name); print (“Please enter your…