Simple Code: Contracts

What Are Contracts?

A high abstraction level of contracts for code is APIs. They define an interface that is basically a contract that the producer and consumer of the API agree to use to communicate with each other. Two common forms of APIs are libraries that are used in code and external APIs that are used via HTTP, RPC, etc.

When thinking a bit deeper, contracts consist firstly of functions, methods, or external endpoints and secondly of data, more precisely on data models and data types within the models.

Understanding Jakarta EE 8 CDI (Part 2): Qualifying Your Beans

enter image description here[As we continue with this series, we will refer to some content and examples from the CDI 2.x specification].

In order for the CDI container to recognize your bean for injection, your bean needs to be qualified. This can be achieved by associating a bean with a qualifier type. A qualifier type represents some client-visible semantic associated with a type that is satisfied by some implementations of the type (and not by others). In other words, a qualifier type identifies a bean with a type that can be satisfied to one specific implementation of the same type (else it becomes an unsatisfied dependency).

Interface Segregation Principle | SOLID as a Rock

Interface Segregation Principle in C++ is the fourth & by far the simplest design principle of a series SOLID as a Rock design principles. The SOLID design principles focus on developing software that is easy to maintainable, reusable & extendable. In this article, we will see a code violating ISP, a solution to the same code, guideline & benefits of ISP.

By the way, If you haven't gone through my previous articles on design principles, then below is the quick links: