Skip to main content

The Dependency Inversion Principle

  • Chapter
  • First Online:
  • 1862 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, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

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

Check for updates. 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

Publish with us

Policies and ethics