Nope. Those are two different patterns. But in frameworks like Spring we use it together a lot to get the best out of it.
@dinithkumudika64593 ай бұрын
@@dev.outpost in concept wise looks the same right? in DI also we create one instance of the class and put it into the DI container so we can use the same instance later on. let's say I am using DI for my db connection class over the singleton. any cons of doing that?
@dev.outpost2 ай бұрын
Here is the answer 🤞 Dependency Injection කියන්නෙ Singleton Design Pattern එකමද? kzbin.infoN6w-sGhekOY