[推薦] Denepdency Injection the Best Pattern

Source

https://www.youtube.com/watch?v=J1f5b4vcxCQ 13:15

Summary

  1. DI 更加容易抽換(composition over inheritance)
  2. DI 更好測試,因為可 mock interface
  3. DI 可以在 runtime 時決定不同的 implementation
cmd + /