Skip to main content

3 posts tagged with "Object-Oriented Programming"

Object-Oriented Programming is a famous programming paradigm

View All Tags

More on Design by Contract - Assertions and Inheritance

· 4 min read
Kenny Pflug
Kenny Pflug
Engineering Manager at TELIS/GWVS, Conference Speaker, Consultant

My previous two posts about Bertrand Meyer's Design by Contract (DbC) were mainly introductions to pre- and post-conditions and class invariants and how they can be implemented in C# – in this one we'll check out what implications DbC has if it is combined with the inheritance mechanism of object-oriented programming languages.

More on Design by Contract – Class Invariants

· 10 min read
Kenny Pflug
Kenny Pflug
Engineering Manager at TELIS/GWVS, Conference Speaker, Consultant

In one of my last posts, I discussed the basics of Bertrand Meyer's Design by Contract, namely pre- and post-conditions on methods. These Boolean assertions are used to check if the caller supplied valid arguments and performed the call while the target object was in a valid state, as well as to verify that the method produced the correct return value and/or side effects after it executed completely. This allows us to give semantic meaning to methods on our objects.

In this post, we will go one step further and discuss what class invariants are.

Abstractions, Abstractions… Different Kinds of Abstractions

· 11 min read
Kenny Pflug
Kenny Pflug
Engineering Manager at TELIS/GWVS, Conference Speaker, Consultant

In my video series on the Dependency Inversion Principle that you can watch on YouTube now, I talk a lot about object-oriented abstractions and how we can use them to structure our code in a loosely coupled way. But I didn’t really specify what ‘Abstraction’ actually means in terms of Computer Science.