The Framework Superclass Anti-Pattern
-
Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.
As a framework designer, you have many other choices: eventing, listeners, and object composition.
-
Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.
As a framework designer, you have many other choices: eventing, listeners, and object composition.
Terrence Dorsey wrote:
If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework
And they wonder why some people find programming difficult.
=====
\ | /
\|/
|
|-----|
| |
|_ |
_) | /
_) __/_
_) ____
| /|
| / |
| |
|-----|
|===
-
Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.
As a framework designer, you have many other choices: eventing, listeners, and object composition.
Oh, you mean like
System.Windows.Forms.Form
? Yeah, that's bad. But what's worse is not being able to derive properly due to broken polymorphism. :mad: -
Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.
As a framework designer, you have many other choices: eventing, listeners, and object composition.