principles:law_of_leaky_abstractions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:law_of_leaky_abstractions [2013-08-04 14:05] – +acronym: LLA christian | principles:law_of_leaky_abstractions [2020-10-12 16:21] – old revision restored (2013-08-29 12:15) 159.69.186.191 | ||
---|---|---|---|
Line 16: | Line 16: | ||
a) the leakiness of abstractions is ignored (bad usage of an abstraction) or | a) the leakiness of abstractions is ignored (bad usage of an abstraction) or | ||
b) the benefits of the abstraction cannot justify the disadvantages created by its leakiness (bad abstraction) or | b) the benefits of the abstraction cannot justify the disadvantages created by its leakiness (bad abstraction) or | ||
- | c) the abstraction is more leaky as necessary (bad abstraction) | + | c) the abstraction is more leaky than necessary (bad abstraction) |
===== Description ===== | ===== Description ===== | ||
Line 22: | Line 22: | ||
===== Rationale ===== | ===== Rationale ===== | ||
+ | Abstractions are typically not perfect. Especially performance aspects are very hard to abstract away from. So there are cases when using the abstraction properly is not possible without knowing the basics underneath the abstraction. So developing and even more fixing defects in a system with leaky abstractions makes it necessary to know about all the details the abstraction is supposed to protect the developers from. Often abstractions reduce the effort to develop a feature while they increase the effort for fixing bugs. The benefits of an abstraction are only reached at the cost of some liabilities so an abstraction is only good when the liabilities are small enough compared to the benefits. | ||
===== Strategies ===== | ===== Strategies ===== | ||
Line 29: | Line 29: | ||
* //Find a better abstraction.// | * //Find a better abstraction.// | ||
* //Remove the abstraction.// | * //Remove the abstraction.// | ||
+ | * Especially refrain from stacking Frameworks on top each other (e.g. Spring in an EJB Container, etc.) | ||
Line 102: | Line 103: | ||
So it would be better if C++ had a real native string type. | So it would be better if C++ had a real native string type. | ||
- | (this example is taken from ((Joel Spolsky: // | + | (this example is taken from ((Joel Spolsky: // |
principles/law_of_leaky_abstractions.txt · Last modified: 2021-10-18 21:51 by christian