Providing that clients would typically consume just one method, though methods would be conceptually related, why not always apply the Interface Segregation Principle to the extreme and have [many] ...
Does Liskov substitution principle apply to inheritance hierarchies where the parent is an abstract class the same way if the parent is a concrete class? The Wikipedia page list several conditions ...
I understand the intent of the open-closed principle. It's meant to reduce the risk of breaking something that already works while modifying it, by telling you to try to extend without modifying. ...
Why would Square inheriting from Rectangle be problematic if we override the SetWidth and SetHeight methods?
If a Square is a type of Rectangle, than why can't a Square inherit from a Rectangle? Or why is it a bad design? I have heard people say: If you made Square derive from Rectangle, then a Square ...
I'm designing a client to the Tomtom WEBFLEET.connect API in PHP. (You can read more about the API through the full documentation here: ...
Let's say I wanted to create a Java List<String> (see spec) implementation that uses a complex subsystem, such as a database or file system, for its store so that it acts as a persistent ...
I'm designing an OO graph library and at the moment I'm trying to figure out the design for a GraphEdge class. I've added setters and getters for it's nodes, direction and weight. This seemes ...
Is it good to have an interface plenty of methods which belong to different concepts, just to preserve the Liskov's Principle?
I'm currently studying a course based on Software Design and I had a discussion in class with my professor and some classmates about a problem represented by the next scenario: Scenario Imagine ...
Are there any well-known quantitative approaches to evaluate a particular design whether it satisfies or violates the SOLID design principles? [duplicate]
I designed an application framework by considering the SOLID design principles and supported by design patterns. However, I wonder if there are any automated tools or well-known approaches to evaluate ...
I'm trying to follow LSP in practical programming. And I wonder if different constructors of subclasses violate it. It would be great to hear an explanation instead of just yes/no. Thanks much! P.S. ...
I'm facilitating a session next week on the Liskov Substitution Principle and I was wondering if anyone had any examples of violations 'from the trenches'? I'm looking for something other than uncle ...
I was following this highly voted question on possible violation of Liskov Substitution principle. I know what the Liskov Substitution principle is, but what is still not clear in my mind is what ...
Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure ...
Is my mediator layer a sensible way to manage this scenario using the Single Responsibility Principle?
I'm not sure how to start to explain my question, but here goes. We have just finished an MVC application that hits 2 WCF services. But there has been a bit of a disagreement between those who worked ...
Here's a problem I frequently run into: Let there be a web shop project that has a Product class. I want to add a feature which allows users to post reviews to a product. So I have a Review class ...
I've been reading Clean Code and various online articles about SOLID lately, and the more I read about it, the more I feel like I don't know anything. Let's say I'm building a web application using ...