Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Lisanna Everything since at least angular 1 has used dependency injection. It's been a standard paradigm for a while.
-
@Lisanna in fameworks, it has more to do with abstacting out (micro services) services, so they knoe of eachother (hence being/having a dependency), but they do not care about each others implementation or configuration. that way you can also lazy load dependencies, eg on a website, a static page like the "contact us" page, where everything comes from either cache or pure html, only need cache and template engine as a dependency but not the database (although the page renderer would most likely never know about the database), regardless the databases is not needed so not injected/initiated
-
@Lisanna i assume so,
In my previous example, class Database, would probably implement an interface so other services can expect what variables and functions are available, but other then that would care less if it was MongoDB, MySQL or even a RestFUL API underneath. -
@GigabyteDX not sure if she's trolling but seems to me like she's in the process of learning what dependency injection is. Nothing wrong with that...
Ask interviewee what dependency injection is
Starts to explain sql injection..
undefined