Category Archives: design

Using discriminated unions to fix Liskov substitution principle violation

As an example of LSP violation, I will consider e-commerce payment system design. One needs to develop generic mechanism for multiple payment service providers (PSP) that are using on checkout step. From the requirements there are different kinds of PSP in terms of integration. … Continue reading

Posted in object-oriented-principles, software-patterns | Leave a comment