[D] The Dependency Inversion Principle

[D] The Dependency Inversion Principle

This article explores the Dependency Inversion Principle (DIP) in SOLID design principles, highlighting the benefits of creating flexible and easy-to-maintain code. It provides a Kotlin example for implementing DIP to achieve an adaptable codebase.

Read →

Hibernate Tutorial: Dialects in Hibernate

Hibernate Tutorial: Dialects in Hibernate

Hibernate requires the configuration of a SQL dialect in order to generate appropriate SQL statements for the specified database type. The org.hibernate.dialect package contains many Dialect classes for various RDBMS.

Read →

[I] The Interface Segregation Principle

[I] The Interface Segregation Principle

This article explains the Interface Segregation Principle (ISP), a SOLID design principle. ISP says that a class should only implement the methods it needs. The article gives an example of a bad practice that violates ISP and a better practice that follows it by creating small, specific interfaces for each class.

Read →

[O] The Open-Closed Principle

[O] The Open-Closed Principle

This article explains the Open-Closed Principle (OCP) of SOLID design, which advises creating flexible and maintainable code by keeping classes open to extension but closed to modification. It uses an example to show how to adhere to the OCP by defining an interface and creating separate classes for each shape.

Read →

[S] The Single Responsibility Principle

[S] The Single Responsibility Principle

The Single Responsibility Principle (SRP) is a design principle promoting maintainable code. It states that each class should have only one job. This post explains its importance with code examples, resulting in more understandable and maintainable code.

Read →