loading...

re: Casting stinks. Generic classes are worse. VIEW POST

TOP OF THREAD FULL DISCUSSION
re: ***Sorry for clicking "Edit Post" like 20 times, but I kept thinking of more ways interfaces really help here. Code to interfaces, not concrete im...
 

That is exactly how I would approach the problem. This approach is a combination of SOLID principles (interface segregation and dependency inversion mostly) and Bridge pattern (decouple an abstraction from its implementation so that the two can vary independently). Also,

"if you have functionality that you're wrapping, that's fine too.",

we can use Template pattern here.

Code of Conduct Report abuse