Sign in
Log inSign up

Dependency Injection makes swapping dependencies easy

Ben Goosman's photo
Ben Goosman
·Mar 25, 2020

I was integrating a chatbot, had everything merged, and was feeling ready to being UAT in production when I was made aware that we needed to use a different version of that chatbot. Since the other version used the same interface as the one I was using, and I was using Dependency Injection to inject the chatbot, all I had to do was swap the object I was passing in.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct