“Liskov Substitution Principle” or LSP is one of the basic principles for proper object orientation. LSP definition is:
“Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T.”
In plain english that means that if CloudPageBlob inherits from CloudBlob and CloudBlob.UpdateText(someText) works CloudPageBlob.UpdateText(someText) should also work and not throw and exception… (or alternatively CloudPageBlob shouldn’t inherit from CloudBlob)
Hear that Microsoft?
Illustration by Benjipie
[…] This post was mentioned on Twitter by Bill de hÓra, Arnon Rotem-Gal-Oz. Arnon Rotem-Gal-Oz said: Blogged: Azure Page Blobs vs. Liskov Substitution Principle http://feedly.com/k/e3O3s2 […]
LOL :-D