Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8889217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:12:28+00:00 2026-06-14T22:12:28+00:00

While i was reading factory , abstract factory design patterns on head first design

  • 0

While i was reading factory , abstract factory design patterns on head first design pattern
book. It mentioned about the phrase.

Could you give an basic example and explanation to clarify it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:12:30+00:00Added an answer on June 14, 2026 at 10:12 pm

    Dependency Inversion Principle; One of the five Object Oriented Design Principles. Check out the answers to this question; “What is the Dependency Inversion Principle and why is it important?” – there’s some really good information there.

    In conventional application architecture, lower-level components are designed to be consumed by higher-level components which enable increasingly complex systems to be built. In this composition, higher-level components depend directly upon lower-level components to achieve some task. This dependency upon lower-level components limits the reuse opportunities of the higher-level components.

    In ‘simple‘ terms, this means that when you rely upon a concrete instance of an object – you’re building a dependency in to your code (albeit without that intention), this then limits the ability to re-use it.

    Remember that a Concrete Type is a type of class that can be instantiated and a Abstract Type is a type that cannot; i.e an interface. (See the Taxonomy of Classes)

    If you code to a specific concrete class then you will always have the requirement for that class. However, if you code to an interface (an abstraction) then it’s possible to adapt your code to work with any number of classes; as long as they implement that common interface.

    So in Java, it means that where possible you should code to an Interface – and avoid making your code depend on specific items. This is often as simple as passing Interface types as parameters and return types; as opposed to concrete classes.

    Less dependencies = More ability to re-use code.
    More dependencies = More requirements to be able to re-use code.

    This will be a re-occuring theme when you’re studying Design Patterns!

    Dependency Inversion Principle on Wikipedia.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While reading proggit today, I came upon this comment in a post about how
While reading about exception, I will always come across checked exceptions and unchecked exceptions,
While reading about and implementing FRP I am confused by the semantics of the
While reading some articles about writing web servers using Twisted , I came across
While reading a book called Let us C I read that a function showbit()
While reading about DataTrigger on MSDN, it says Represents a trigger that applies property
I tried out DAO Pattern after reading http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html but I get NullPointerException when I
While reading about binary semaphore and mutex I found the following difference: Both can
While reading on Decorator pattern, came across something that needed to be clarified. In
While reading Wikipedia's page on decltype , I was curious about the statement, Its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.