Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

2018 10-25 依存について

121 views

Published on

依存について

Published in: Technology
  • Be the first to comment

  • Be the first to like this

2018 10-25 依存について

  1. 1. NOBUKATSU FURUHASHI
  2. 2. ~ ~ ( )
  3. 3. use mechanism; class policy { public $mechanism public function __construct() { $this->mechanism = new mechanism(); //policy mechanism } }
  4. 4. use mechanismable; class policy { public $mechanism public function __construct(mechanismable $mechanism) { //policy mechanismable $this->mechanism = $mechanism; } }
  5. 5. DIP:DEPENDENCY INVERSION PRINCIPLE
  6. 6. A. B.
  7. 7. A.
  8. 8. • • policy • • mechanism
  9. 9. A.
  10. 10. POLICY MECHANISM
  11. 11. Policy Layer Mechanism Layer
  12. 12. POLICY MECHANISM
  13. 13. Policy Layer Mechanism Layer Mechanism Service Interface Policy Mechanism
  14. 14. POLICY MECHANISM MECHANISM
  15. 15. A.
  16. 16. POLICY MECHANISM
  17. 17. Policy Layer Mechanism Layer Mechanism Service Interface Policy Mechanism
  18. 18. Policy Layer Mechanism Layer Policy Service Interface Mechanism Policy
  19. 19. POLICY POLICY MECHANISM POLICY
  20. 20. A. B.
  21. 21. • • • 
 • 


×