Skip to content

Azure Page Blobs vs. Liskov Substitution Principle

“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

Published inBlog

2 Comments

Comments are closed.