Some limitations, advantages of IOC container for dependency injection.
Let’s go through some limitations of IOC container.
· All the methods in the controller uses select all fields approach so the unwanted fields are also fetched and it slows down the execution.
A practical solution is to split your persistent storage i.e. the database interaction into two groups one for R(Read) and other for CUD(Create Update Delete). This approach is because reads are the functions which cause an application to slow down.CUD happens less often.
· The flow of the application is hard to figure out.
· Dependency injection is like another framework so the developer needs to get accustomed to it.
· It encourages you to write more modular code.
· It decouples the application.
· Provides greater flexibility by injecting dependencies at runtime.