Skip to main content

Questions tagged [solid]

Mnemonics for set of design principles: Single responsibility, Open-closed, Liskov substitution, Interface segregation, Dependency inversion

7 votes
3 answers
546 views

The Java List<E> interface includes methods, such as add(E) and remove(Object), that work as the names suggest on instances of mutable concrete implementations, such as ArrayList<E> and ...
Ellen Spertus's user avatar
3 votes
7 answers
556 views

I'm working on a custom Magento 2 module in my internship, and I'm trying to follow SOLID principles in my code. Right now, my controller actions handle everything: getting request data, processing it,...
Ruben Eekhof's user avatar
5 votes
4 answers
958 views

Specific example question: I am writing multiple different software packages, in different repos, that each do different things. Many of these packages produce something that we want to visualise/plot....
armoured-moose's user avatar
0 votes
1 answer
256 views

I'm working on an ASP.NET Core application that uses Identity for user management. I have an AccountService with a Register function, where I accept a RegisterBaseDto that contains the role ...
Marko Sami's user avatar
1 vote
3 answers
268 views

According to Invariant rule in Liskov Substitution Principle, I know one of the form of violation of "Liskov Substitution Principle" is violating "invariants can't be weakened in a ...
wcminipgasker2023's user avatar
0 votes
2 answers
147 views

I have long standing argue about dependency injection and SOLID principles with my teammate. We both want to make an Exporter, to export data into various formats. My approach (in PHP): class Exporter ...
JohnyProkie's user avatar
3 votes
4 answers
272 views

If you have a class representing your applicative config file. Instead of injecting that config class everywhere, would it be good application of interface segregation principle to expose several ...
Calimero's user avatar
  • 141
-1 votes
1 answer
170 views

Let's say that I have a class with a service that is going to be injected at runtime: class Thing { private magic: IMagic; // Magically injected service public doStuff(){ // Do a lot ...
Tizio Fittizio's user avatar

15 30 50 per page
1
2 3 4 5
28