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 8650677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:52:56+00:00 2026-06-12T13:52:56+00:00

Possible Duplicate: How exactly does dependency injection reduce coupling? Dependency Injection as a concept,

  • 0

Possible Duplicate:
How exactly does dependency injection reduce coupling?

Dependency Injection as a concept, I think, encapsulates loose coupling. Is it correct to say that it helps in achieving Loose Coupling? From what I understand, if you have designed a class with loose coupling, then you can implement DI on it. Please help me understand and correct me if I am wrong.

  • 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-12T13:52:57+00:00Added an answer on June 12, 2026 at 1:52 pm

    I would say that loose coupling has inherently nothing to do with DI. You can use DI on a project that has completely tight coupling if you want.

    Loose coupling is isolation of one component from the implementation details of another. It is typically achieved in java by providing collaborators as an instance of an interface, rather than a concrete class.

    What i would say is that DI tends to lead people toward loosely coupled code in many situations, but it doesn’t force them to it (though in some products like spring there are a lot of downsides to not using interfaces). Containers also have support for wiring loosely coupled collaborators as well. This example is perfectly fine in a DI container, while being tightly coupled.

    public class FooService { ... }
    
    public class SomeOtherService {
         public SomeOtherService(FooService fooService) {
              this.fooService = fooService;
         }
    }
    

    However, this is loosely coupled, since the “SomeOtherService” is tied to the interface.

    public interface FooService { ... }
    
    public class SomeOtherService {
         public SomeOtherService(FooService fooService) {
              this.fooService = fooService;
         }
    }
    

    Insert your favorite wiring mechanism (guice, spring annotations, spring xml, java cdi), but the concept is the same.

    Wikipedia has a good article on loose coupling:

    http://en.wikipedia.org/wiki/Loose_coupling

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

Sidebar

Related Questions

Possible Duplicate: What does “$?” give us exactly in a shell script? What does
Possible Duplicate: JavaScript: formatting number with exactly two decimals Now that I have got
Possible Duplicate: What is The Rule of Three? How exactly does std::pair call destructors
Possible Duplicate: In Javascript/jQuery what does (e) mean? I'm new to programming. What exactly
Possible Duplicate: Reference - What does this symbol mean in PHP? What exactly does
Possible Duplicate: How exactly does <script defer=“defer”> work? Can anybody explain me how defer
Possible Duplicate: What does $(function() {} ); do? what exactly does the following syntax
Possible Duplicate: What is dependency injection? Other developers on my team keep talking about
Possible Duplicate: What exactly does the "u" do? "git push -u origin master" vs
Possible Duplicate: What does Hasmorepages PrintPageEventArgs property do exactly? I would like to advance

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.