Sign in

The Dependency Inversion Principle is the last principle in SOLID. As a recap, SOLID is an acronym that stands for the five software design principles which Robert Martin discusses in his book “Clean Architecture — A Craftsman’s Guide to Software Structure and Design”.

What is Dependency Inversion Principle (DIP) about?

What is DIP not about?


I recently had a chance to clean up some of the deprecated libraries I used for validating a JWT access token or obtain one via the client-credentials flow or the on-behalf-of flow. The libraries I used were under the Microsoft.AspNetCore.Authentication.AzureAD packages. Per the document, since ASP.NET core 5.0, users should use the Microsoft.Identity.Web package to integrate with Azure AD and Azure ADB2C.

Before, to validate a token, I used the Microsoft.AspNetCore.Authentication.AzureAD package along with the Microsoft.AspNetCore.Authentication.JwtBearer package. I explicitly specified the token validation parameters to validate a token.

public static IServiceCollection AddSecurity(this IServiceCollection services…


The Interface Segregation Pattern (ISP) is one of the principle in SOLID. As a recap, SOLID is an acronym which stands for the five software design principles:

ISP states that a module should not depend on other modules that it does not need. This pattern can help make your components more cohesive and less coupling. How? Your modules are more cohesive if each of the modules don’t depend on other modules that it does not need.

ISP works in tandem…


In several applications I worked on, we used iframe to display PDFs. The PDF displays fine on desktop browsers. However, on a mobile browser such as Safari on iPhone and iPAD, only the first page shows up. Many people have run into the same issue, as discussed in this stackoverflow post and also on the apple communities page.

In the most recent application that I worked on, I checked out ng2-pdf-viewer for rendering a PDF. This library is straightforward to use. The installation and setup is straightforward. …


Image by Gerd Altmann from Pixabay

In this post, I share the three libraries I find useful for unit testing a .NET project: EF Core SQLite Database Provider, Bogus and Moq.

Entity Framework Core SQLite Database Provider

Before I learned about and started using Entity Framework in projects, I was reluctant to test database-related codes because I thought the tests would have to connect to an external database, which could be a problem, especially when using a CI process to build the app. However, Entity Framework SQLite provider makes it much straightforward to setup an in memory database and a DBContext wrapping around it. …


Image by Gerhard G. from Pixabay

In October 1987, Barbara Liskov published a research paper in which she discussed about different but related concepts: data abstraction, inheritance, encapsulation, implementation hierarch, type hierarchy and polymorphism. I’ve found the paper to be insightful and informative. In this post, I simply give a recap of what I have learned and share my thoughts from reading the paper.

Data abstraction, inheritance and encapsulation are fundamental concepts in object oriented programming. Data abstraction separates the implementation from the specification of a class, and having the callers of the class to rely on the specification. Encapsulation hides away the implementation details of…


Image by Henryk Niestrój from Pixabay

In the previous post, I wrote about Barbara Liskov research paper on data abstraction and hierarchy. In the paper, the author states a property which exists between type and subtype. That property later becomes known as the Liskov Substitution Principle. In this post, I continue to go over the principle in more details and give examples. The principle is one out of the five software design principles in SOLID:

What is the Liskov Substitution Principle?

The Liskov Substitution Principle refers to a property between a type…


In this post, I continue to share what I have learned about the SOLID principles in the book “Clean Architecture A Craftsman’s Guide to Software Structure and Design”. As a recap, six principles make up the SOLID acronym:

In the previous post, I wrote about the Single Responsibility Principle. In this post, I write about the Open Closed Principle.

The Open Closed Principle states that a module should be open for extension, but closed for modification. The definition can be…


Recently, I read the book “Clean Architecture” by Robert C. Martin. Overall, this is a great book with a wealth of information on software design principles to guide developers to build scalable, maintainable and flexible applications. A core part of the book discusses about six design principles which together make up the acronym SOLID.

The SOLID acronym represents the six principles:

In this post, I give a recap of the Single Responsibility Principle, which is…


Photo by Jason Dent on Unsplash

In this post, I outline a few fundamental concepts I have learned about an Observable and how it is different than a Promise.

Before discussing the differences between an Observable and a Promise, let’s talk about what they have in common. Both Observables and Promises are frameworks for producing and consuming data. They follow the push protocol which means the producer determines exactly when to send the data to the consumer. In comparison, in a pull protocol, the producer only produces data when the consumer asks for it.

In a Promise, the consumer is the resolve callback that you pass…

Tai Bo

Backend developer in .NET core. I enjoy the outdoor, hanging out with good friends, reading and personal development.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store