Over time I could understand two parts of SOLID – the “S” and “O”. “O” – I learned Open Closed Principle with the help of Inheritance and Strategy Pattern. “S” – I learned Single Responsibility ...
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 ...
I'm doing unit testing and in one of my classes I need to send a mail from one of the methods, so using constructor injection I inject an instance of Zend_Mail class which is in Zend framework. Now ...
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 ...
Inspired by this answer: Liskov Substitution Principle requires that Preconditions cannot be strengthened in a subtype. Postconditions cannot be weakened in a subtype. Invariants ...
Today I've just seen this article which described the relevance of SOLID principle in F# development- F# and Design principles – SOLID And while addressing the last one - "Dependency inversion ...
How does thinking on design patterns and OOP practices change in dynamic and weakly-typed languages?
There is a fairly helpful question already along these lines ("Non-OOP Design Patterns?"), but I am more curious about a transitional point of view for someone just getting started with dynamic and ...
When do the SOLID principles become YAGNI? As programmers we make trade-offs all the time, between complexity, maintainability, time to build and so forth. Amongst others, two of the smartest ...
I would probably consider it a code smell or even an anti-pattern to have a class that implements 23 interfaces. If it is indeed an anti-pattern, what would you call it? Or is it simply just not ...