As innovative developer, I always loved to learn and implement design principles and patterns. DI patterns are one of it.
DI Patterns as well defined by "Mark Seemann" in his book "Dependency Injection in .NET":
It is set of design principles and patterns which enable to write loosely coupled code.
I bet, you would love to read "How to explain Dependency Injection to a 5-year old" (unfortunately closed article) article on the stackoverflow.
ASP.NET MVC in its way, has provided various ways to write loosely coupled web applications. In the ASP.NET MVC, we can use DI patterns by
I will keep posting more on the above mentioned ways to use DI patterns in ASP.NET MVC.
DI Patterns as well defined by "Mark Seemann" in his book "Dependency Injection in .NET":
It is set of design principles and patterns which enable to write loosely coupled code.
I bet, you would love to read "How to explain Dependency Injection to a 5-year old" (unfortunately closed article) article on the stackoverflow.
ASP.NET MVC in its way, has provided various ways to write loosely coupled web applications. In the ASP.NET MVC, we can use DI patterns by
- Writing our own Controller Factory by Implementing IControllerFactory interface
- Writing custom Controller Factory by deriving from DefaultControllerFactory
- Writing custom Dependency Resolver by implementing IDepedencyResolver interface.
- Writing custom ControllerActivator by implementing IControllerActivator.
I will keep posting more on the above mentioned ways to use DI patterns in ASP.NET MVC.