Mastering Creational Design Patterns in Java: Factory, Prototype, and Builder Approaches
Instantiation logic often becomes tightly coupled with business requirements when objects are created directly using the new keyword. Modifying these dependencies later requires widespread code changes, violating the Open/Closed Principle. Creational design patterns abstract the object creation process, centralizing initialization logic and enh ...
Posted on Mon, 15 Jun 2026 17:02:33 +0000 by kcengel
The Builder Design Pattern: Decoupling Object Construction
Understanding the Builder Pattern
The Builder design pattern aims to separate the construction of a complex object from its representation. This allows the same construction process to create different representations. It is primarily useful when an object's creation involves multiple steps, complex logic, or many components.
Core Concept and B ...
Posted on Thu, 11 Jun 2026 17:35:51 +0000 by Prellyan
Implementing Object Construction Strategies: Builder and Prototype Patterns
The Builder Pattern
The Builder pattern is a creational design pattern aimed at constructing complex objects step by step. It enables the creation process to be independent of the representation, allowing the same construction logic to produce different results. Unlike simple factories that provide an object directly, the Builder patttern focus ...
Posted on Fri, 15 May 2026 06:19:19 +0000 by Redapple
Lombok Builder Annotation Pitfall: Why Default Field Values Disappear
A stable public service interface, previously maintained and later handed over, started throwing NullPointerException errors when a new consumer system integrated with it. The error occurred within a conditional block:
if (req.getFlag()
&& req.getName() != null
&& req.getType() != null) {
// execute business logic
...
Posted on Thu, 07 May 2026 07:18:21 +0000 by pnoeric