43

Ask interviewee what dependency injection is

Starts to explain sql injection..

Comments
  • 10
    Vaccines are important...
  • 1
    Wait...what? injection?? The one the doctor gives?? 😀
  • 1
    @Lisanna Everything since at least angular 1 has used dependency injection. It's been a standard paradigm for a while.
  • 0
    @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
  • 0
    it is same like import in java or use of c# or include of c or c++?
  • 0
    @Lisanna no it's the other way around
  • 0
    @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.
  • 0
    It's when you inject your kids right...
  • 1
    @Lisanna you're trolling right?
  • 2
    @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...
Add Comment