New answers tagged object-oriented
-1
votes
Why is having bloated interfaces an anti pattern?
Bloat is always bad, because it costs resources (time, money, attention, efficiency, space) without giving value.
Now in the specific case of bloated interfaces, they violate the Interface segregation ...
8
votes
Accepted
Why is having bloated interfaces an anti pattern?
The interface segregation principle (ISP) stands regardless one's desire to test classes. But if you never bothered to decouple (because there was no apparent need) and then you must write tests, the ...
1
vote
How would a SRP `class Car` look like?
There is no global answer to this, and in particular it depends on what your program is simulating. To take some highly simplified examples:
If your Car represents a Formula 1 race car, you probably ...
1
vote
Clean code and SOLID principles in WPF/MVVM view models?
I spent three years developing a WPF application for flight test management. Here are some of the principles that I followed:
Use a foundational infrastructure, such as Prism, that enables modular ...
1
vote
Accepted
How to deduplicate implementation details coupling to the host objects' actions?
Reverse the dependency. The Worker is the class that is supposed to be stopping itself when its container goes to sleep, so let it subscribe to the container. This allows you to avoid repeating ...
Top 50 recent answers are included
Related Tags
object-oriented × 3228design-patterns × 649
design × 574
object-oriented-design × 471
java × 466
c# × 346
php × 259
c++ × 226
inheritance × 172
architecture × 146
python × 143
interfaces × 143
solid × 130
class-design × 129
domain-driven-design × 112
functional-programming × 89
programming-practices × 86
mvc × 86
class × 81
encapsulation × 74
single-responsibility × 73
refactoring × 68
programming-languages × 66
composition × 63
polymorphism × 60