Why dependency injection is used in mvc?



Why dependency injection is used in mvc?..

Answer / Kirti Agarwal

Dependency injection is used in MVC to decouple components, making them easier to test and exchange. It helps to improve modularity, reduce dependencies, and promote loose coupling.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MVC Model View Controller Interview Questions

How routing is done in mvc pattern?

1 Answers  


What is domain model in mvc?

1 Answers  


Why is mvc good?

1 Answers  


What is mvc in struts framework?

1 Answers  


Difference between mvc and web api?

1 Answers  


What is the difference between web api and mvc routing?

1 Answers  


Explain using hyperlink how you can navigate from one view to other view?

1 Answers  


Mention what are the two ways to add constraints to a route?

1 Answers  


Why filters are used in mvc?

1 Answers  


What is mvc request life cycle?

1 Answers  


What is the viewbag in mvc?

1 Answers  


What is mvc page life cycle?

1 Answers  


Categories