solid-principles Questions
8
Solved
I am struggling to understand how the Single Responsibility Principle can me made to work with OOP.
If we are to follow the principle to a tee, then are we not left with many classes, many of whi...
Fronton asked 3/10, 2017 at 9:19
1
Solved
I am learning SOLID principle. While learning "Dependency Inversion Principle" found out that class should depend on interfaces rather than concrete classes.
Does this mean composition is...
Fascist asked 11/6, 2024 at 14:35
4
Suppose we are designing a UserServiceImpl class which does CRUD (Create, Read, Update, and Delete) operations. In my view Create, Read, Update, and Delete are four reasons for a class to change. D...
Diazotize asked 15/4, 2010 at 7:53
6
Solved
How does the SOLID "Interface Segregation Principle" differ from "Single Responsibility Principle"?
The Wikipedia entry for SOLID says that
ISP splits interfaces which are very large into small...
Disclaim asked 17/1, 2013 at 21:20
4
Solved
I am trying to understand the Single Responsibility principle but I have tough time in grasping the concept. I am reading the book "Design Patterns and Best Practices in Java by Lucian-Paul Torje; ...
Lynching asked 9/9, 2018 at 18:12
3
Solved
I've started to apply SOLID principles to my projects. All of them are clear for me, except dependency inversion, because in Python we have no change to define variable in type of some class inside...
Nolly asked 22/4, 2020 at 6:34
5
Is this Simple Factory violating the Open Closed Principle?
The SimpleProductFactory needs to change every time a new concrete product needs to be created but it adheres to the single responsibili...
Euphrates asked 31/12, 2017 at 15:40
4
Solved
Introduction
Hi everyone, I'm currently working on a persistence library in C#. In that library, I have implemented the repository pattern where I'm facing a SOLID issue.
Here is a simplified examp...
Renown asked 1/1, 2018 at 0:15
2
I ask my self if the Facade Pattern violates the SOLID principles and if the pattern itself is an Anti Pattern.
UPDATED
My Opinions:
SRP is violated, when you don't just call methods directly, ...
Nervine asked 22/8, 2016 at 12:33
35
Solved
I have heard that the Liskov Substitution Principle (LSP) is a fundamental principle of object oriented design. What is it and what are some examples of its use?
Boys asked 11/9, 2008 at 15:17
3
I am building an Android app following the Clean Architecture Principles. Here is what I've got:
app module:
Contains all the Android dependencies.
Uses MVVM with ViewModel from the arch component...
Volition asked 3/11, 2020 at 20:11
3
I found in Laravel - Eloquent's method like updateOrCreate().
Why in framework we can find methods which are breaking clean code and SOLID rules?
Sapphirine asked 16/6, 2021 at 17:57
12
Solved
The design pattern the first letter in this acronym stands for is the Single Responsibility Principle. Here is a quote:
the single responsibility principle
states that every object should have ...
Prescriptible asked 8/6, 2010 at 14:1
5
The DIP states:
High-level modules should not depend on low-level modules. Both should depend on abstractions.
Abstractions should not depend upon details. Details should depend upon abstrac...
Advisee asked 25/8, 2013 at 10:29
6
My understanding of the Liskov substitution principle is that some property of the base class that is true or some implemented behaviour of the base class, should be true for the derived class as w...
Bordelaise asked 14/11, 2009 at 18:30
2
I was looking into the Single Responsibility Principle(SRP) and Open Closed Principle(OCP).
SRP states that a class must have only one reason to change.
OCP states that the class must be closed fo...
Hohenstaufen asked 24/6, 2015 at 5:49
14
Solved
The Open/Closed Principle states that software entities (classes, modules, etc.) should be open for extension, but closed for modification. What does this mean, and why is it an important principle...
Quiroz asked 12/9, 2008 at 13:48
4
As per the Interface Segregation Principle
clients should not be forced to implement the unwanted methods of an interface
...and so we should define interfaces to have logical separation.
Bu...
Puzzlement asked 23/9, 2017 at 8:25
2
Solved
I'm learning about SOLID principles, and ISP states that:
Clients should not be forced to depend upon interfaces that they do
not use.
Does using default methods in interfaces violate this princi...
Bozarth asked 21/7, 2021 at 6:23
1
I have a question regarding the "Use Case Output Port" in Uncle Bob´s Clean Architecture.
In the image, Uncle Bob describes the port as an interface. I am wondering if it has to be that way or if ...
Atonal asked 20/5, 2016 at 11:4
2
I was recently reading this blog https://blog.cleancoder.com/uncle-bob/2021/03/06/ifElseSwitch.html and this paragraph confused me:
Be careful with that token x. Don’t try to make it an enum or an...
Irresolute asked 18/4, 2021 at 15:44
3
Just a thought and a question to the Stack Overflow and Microsoft Development Community about the OO software design principles called SOLID. What is the difference between the Liskov Substitution ...
Licentious asked 9/10, 2019 at 8:44
16
Solved
What is the dependency inversion principle and why is it important?
Fernald asked 15/9, 2008 at 12:53
2
Solved
In an effort to apply SOLID principles to a Python project that has grown organically and is in need of re-factoring, I am trying to understand how the Interface Segregation Principle can be applie...
Anvers asked 9/10, 2015 at 11:50
3
Solved
It looks to me like Bob Martin needed something starting with O to make SOLID and found in some old book this (possibly useless) Open/Closed principle.
How can Open/Closed co-exists with the Singl...
Pentose asked 26/2, 2016 at 17:31
1 Next >
© 2022 - 2025 — McMap. All rights reserved.