Skip to main content

Introducing new learning courses and educational videos from Apress. Start watching

The Dependency Inversion Principle

  • 1732 Accesses

Abstract

The last of the SOLID principles of class design focuses on class dependencies. It tells you what kinds of things a class should depend on:

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-1-4842-4119-6_5
  • Chapter length: 38 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   54.99
Price excludes VAT (USA)
  • ISBN: 978-1-4842-4119-6
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   69.99
Price excludes VAT (USA)
Figure 5-1
Figure 5-2
Figure 5-3
Figure 5-4
Figure 5-5
Figure 5-6
Figure 5-7
Figure 5-8
Figure 5-9

Notes

  1. 1.

    Robert C. Martin, “The principles of OOD,” http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

  2. 2.

    Robert C. Martin (May 1996), “The Dependency Inversion Principle,” C++ Report (PDF available at http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod ).

  3. 3.

    Robert C. Martin (May 1996), “The Dependency Inversion Principle,” C++ Report (PDF available at http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod ).

  4. 4.

    https://github.com/symfony/event-dispatcher/blob/2.3/EventDispatcherInterface.php

  5. 5.

    https://github.com/laravel/framework/blob/4.0/src/Illuminate/Events/Dispatcher.php

  6. 6.

    Erich Gamma e.a., Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, 1994.

  7. 7.

    Craig Larman, Applying UML and Patterns, Prentice Hall (2001).

  8. 8.

    “Mocking at architectural boundaries: persistence and time,” https://matthiasnoback.nl/2018/02/mocking-at-architectural-boundaries-persistence-and-time/ “Mocking at architectural boundaries: the filesystem and randomness,” https://matthiasnoback.nl/2018/03/mocking-the-filesystem-and-randomness/ and “Mocking the network,” https://matthiasnoback.nl/2018/04/mocking-the-network/

  9. 9.

    Erich Gamma e.a., Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, 1994.

  10. 10.

    Erich Gamma e.a., Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, 1994.

  11. 11.

    https://symfony.com/doc/current/components/security/authorization.html

  12. 12.

    https://github.com/symfony/security/blob/v4.1.6/Core/Authorization/AccessDecisionManager.php

  13. 13.

    https://tactician.thephpleague.com/

  14. 14.

    https://github.com/thephpleague/tactician/blob/v1.0.3/src/CommandBus.php

  15. 15.

    https://github.com/thephpleague/tactician/blob/v1.0.3/src/Middleware.php

  16. 16.

    https://github.com/thephpleague/tactician/blob/v1.0.3/src/Handler/CommandHandlerMiddleware.php

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and Permissions

Copyright information

© 2018 Matthias Noback

About this chapter

Verify currency and authenticity via CrossMark

Cite this chapter

Noback, M. (2018). The Dependency Inversion Principle. In: Principles of Package Design. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4119-6_5

Download citation