Why does dependency injection appear at the front end, and in what scenarios will it be used?

Sorry, the comprehension is poor. I can understand the back-end dependency injection a little, but I really can"t understand it with the same concept at the front end. I can"t think of a suitable scenario. Please help me explain it. Thank you very much

.

there is also a scenario in which one class depends on another, and it is very common. At this time, using dependency injection looks much better than new N classes.


dependency injection is a design idea, and it has nothing to do with front-end and back-end

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f323-4f0da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f323-4f0da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?