Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
165 views

Service Aggregator In N Tier Architecture Pattern

I develop an N Tier Architecture application You can see at this link At there I have an question. As we know that in classic n tier architecture each service layer consist of many public and private ...
Eyup Can ARSLAN's user avatar
0 votes
1 answer
147 views

Implementing Dependency Injection design pattern

I was told that it's possible to implement the Dependency Injection design pattern two times in the following code and that changing the method signatures was allowed: public class Person { ...
Kwa Kao's user avatar
0 votes
2 answers
1k views

Package decoupling in go

We all know dependency injection makes packages decoupled. But I'm a little confused about best practices of dependency injection in go. Lets assume package User needs to access Config package. We can ...
Mostafa Solati's user avatar
2 votes
2 answers
528 views

Constructor injection with two different interfaces (Single Responsibility and Interface Segregation)

I am learning SOLID Principles. I am working now with Dependency Injection and Interface Segregation Principles. I've already got the basics of this two but when I combined it, I got confused. Here's ...
Jhe's user avatar
  • 97
3 votes
1 answer
110 views

Factory object creating objects that need other objects

I need a factory object able to create several objects but in injecting other objects in them. For example: class MyFactory { public function createObjectA() { return new ObjectA(new ...
benjamin.cohen-solal's user avatar
0 votes
1 answer
218 views

Understanding dependency inversion principle and creating a hardwired IOC container of my own for Dependency Injection without @Inject or @Autowired

I'm a little confused about the differences of the SOLID dependency Inversion principle and IOC containers. Should there only be one class responsible for wiring all the dependencies? I don't want to ...
Horse Voice's user avatar
  • 8,328
1 vote
1 answer
63 views

Why one controller has repository injected and the other the service

I'm reading M. Seemann book Dependency Injection in .NET, chapter 2. Source code available here: http://www.manning.com/seemann/ In ComplexCommerce solution, CommerceWebPresentationModel, ...
Mariusz.W's user avatar
  • 1,377
1 vote
1 answer
226 views

Where to put abstractions in SOLID programming? [closed]

I develop a game engine in XNA. This engine has some modules (subprojects), such as Renderer, StateManagement, etc. Refering to Dependency Inversion Principle: "High-level modules should not depend ...
HumanGenome's user avatar
24 votes
5 answers
22k views

How to practice SOLID principle of OOP design? [closed]

I'm new to SOLID principle but I understand it. My main problem is having a hard time designing my classes to follow the SOLID specially the Dependency Inversion. Sometimes it's easy to write the ...
Ruby's user avatar
  • 315
1 vote
6 answers
779 views

SOLID/TDD encourages one implementation for one interface

I overheard the below and was asked to confirm this statement: "SOLID/TDD encourages one implementation for one interface, this is not real world and goes against the point of interfaces doesn't it?" ...
Jon's user avatar
  • 40k