Tag

Builder Pattern

0 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Oct 18, 2024 · Backend Development

Design and Refactoring of a Java SDK with Proxy Optimization and Integration Test Enhancements

The article details how a Java SDK for a CIM instant‑messaging system was redesigned using Java 8+ features and the Builder pattern, introduced a lightweight proxy resembling RPC frameworks with dynamic‑URL support, and added comprehensive integration tests that verify automatic client reconnection and reliable message delivery across clustered servers.

Builder PatternJavaRPC
0 likes · 10 min read
Design and Refactoring of a Java SDK with Proxy Optimization and Integration Test Enhancements
Selected Java Interview Questions
Selected Java Interview Questions
Jul 18, 2024 · Backend Development

Exploring Nine Design Patterns in MyBatis: Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator

This article examines nine design patterns employed within MyBatis—Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator—detailing their roles, source code examples, and how they facilitate configuration parsing, SQL execution, and caching in the framework.

Builder PatternFactory PatternJava
0 likes · 18 min read
Exploring Nine Design Patterns in MyBatis: Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator
Sanyou's Java Diary
Sanyou's Java Diary
Mar 28, 2024 · Backend Development

Why Lombok’s @Builder Drops Default Values and How to Fix It

This article walks through a real‑world NPE caused by Lombok’s @Builder ignoring field initializers, explains the underlying double‑initialisation bug, shows how @Builder.Default restores the defaults, and outlines Lombok’s compile‑time annotation processing mechanism.

Builder PatternCompile-time AnnotationJava
0 likes · 15 min read
Why Lombok’s @Builder Drops Default Values and How to Fix It
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 12, 2023 · Fundamentals

Understanding the Builder Design Pattern with Java Examples

The Builder pattern separates object construction from its representation, enabling the same construction process to produce varied complex objects, and is illustrated through a Java house-building example that defines abstract and concrete builders, a product class, a director, and client code.

Builder PatternJavaObject Creation
0 likes · 6 min read
Understanding the Builder Design Pattern with Java Examples
Code Ape Tech Column
Code Ape Tech Column
Sep 12, 2023 · Backend Development

Why You Should Stop Using Lombok’s @Builder and Prefer @Accessors

The article explains the pitfalls of Lombok’s @Builder annotation—such as loss of default values, mutable builders, and limited applicability—and demonstrates how using @Accessors with chainable setters provides a safer, more flexible alternative for Java backend development.

AccessorsBuilderBuilder Pattern
0 likes · 10 min read
Why You Should Stop Using Lombok’s @Builder and Prefer @Accessors
Architecture Digest
Architecture Digest
Jun 9, 2023 · Backend Development

Applying Strategy, Factory Method, and Builder Patterns in Spring for Reward Distribution

This article explains how to implement the Strategy, Factory Method, and Builder design patterns within a Spring application to create a flexible reward‑distribution system, providing detailed code examples, usage guidelines, and best‑practice considerations for each pattern.

Builder PatternFactory MethodJava
0 likes · 12 min read
Applying Strategy, Factory Method, and Builder Patterns in Spring for Reward Distribution
JD Retail Technology
JD Retail Technology
Apr 23, 2023 · Fundamentals

Design Patterns and Programming Paradigms: Concepts, Architecture Patterns, and Practical Applications

This article explores the relationship between design patterns and programming languages, explains various programming paradigms, compares design patterns with architectural patterns, outlines key design principles, and provides extensive Java code examples illustrating factory, strategy, template method, builder, proxy, chain of responsibility, and command patterns in practice.

Builder PatternCode ExamplesFactory Pattern
0 likes · 27 min read
Design Patterns and Programming Paradigms: Concepts, Architecture Patterns, and Practical Applications
Java Architect Essentials
Java Architect Essentials
Sep 10, 2022 · Fundamentals

A Generic Builder Pattern for Simplifying Java Object Creation

This article demonstrates how to replace verbose Java object instantiation and setter calls with a reusable generic Builder that supports chained property setting via functional interfaces, showing both a simple example and a full implementation supporting up to three parameters per setter.

Builder PatternGeneric BuilderJava
0 likes · 8 min read
A Generic Builder Pattern for Simplifying Java Object Creation
Cognitive Technology Team
Cognitive Technology Team
Apr 25, 2022 · Backend Development

Two Ways to Instantiate org.apache.ibatis.jdbc.SQL in MyBatis

This article explains two techniques for creating an org.apache.ibatis.jdbc.SQL object in MyBatis—using an anonymous inner class with an initializer block and using method‑chaining builder style—provides code examples, explains the underlying Java syntax, and summarizes their differences.

Builder PatternJavaMethod Chaining
0 likes · 4 min read
Two Ways to Instantiate org.apache.ibatis.jdbc.SQL in MyBatis
Cognitive Technology Team
Cognitive Technology Team
Mar 21, 2022 · Backend Development

Using the Builder Pattern to Manage Multiple Constructor Parameters in Java

The article explains how the Builder pattern helps simplify object creation when a class has many required and optional parameters, using Java's HttpClient and HttpRequest examples to demonstrate fluent configuration and reduce constructor overloads.

Builder PatternHttpClientJava
0 likes · 2 min read
Using the Builder Pattern to Manage Multiple Constructor Parameters in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 23, 2021 · Fundamentals

Builder Pattern in Java: Implementation, Usage, and Comparison with Simple Factory

This article explains the Builder design pattern in Java with complete code examples—including Product, abstract Builder, ConcreteBuilder, Director, and client code—demonstrates the output, compares it to the simple factory pattern, and briefly shows how ASM bytecode manipulation can generate similar constructs.

Builder PatternJavaObject Creation
0 likes · 6 min read
Builder Pattern in Java: Implementation, Usage, and Comparison with Simple Factory
Top Architect
Top Architect
Jun 25, 2021 · Backend Development

Java OkHttp3 Utility Wrapper for Backend Development

This article introduces a Java OkHttp3 utility class that simplifies HTTP requests for backend developers, covering Maven dependency setup, code implementation with builder pattern, synchronous and asynchronous request methods, header and parameter handling, and usage examples.

BackendBuilder PatternHTTP
0 likes · 11 min read
Java OkHttp3 Utility Wrapper for Backend Development
Architect's Tech Stack
Architect's Tech Stack
Jan 20, 2021 · Fundamentals

Using a Generic Builder Pattern in Java to Simplify Object Creation

This article demonstrates how a universal Builder utility can replace verbose object construction in Java, allowing developers to instantiate a class and set multiple properties—including complex collections—in a single fluent chain, while also explaining the underlying implementation and usage examples.

Builder PatternFluent APIJava
0 likes · 7 min read
Using a Generic Builder Pattern in Java to Simplify Object Creation
macrozheng
macrozheng
Feb 14, 2020 · Backend Development

How Lombok Supercharges Your Java Code and Eliminates Boilerplate

This article explains what Lombok is, how to integrate it into a Maven project, and demonstrates its most useful annotations—such as @Getter, @Setter, @Builder, @AllArgsConstructor, @NoArgsConstructor, @RequiredArgsConstructor, @NonNull, @Cleanup, and @SneakyThrows—to dramatically reduce boilerplate, simplify object creation, enforce null checks, manage resources, and streamline exception handling in Java applications.

AnnotationsBoilerplate ReductionBuilder Pattern
0 likes · 8 min read
How Lombok Supercharges Your Java Code and Eliminates Boilerplate
Java Captain
Java Captain
Dec 26, 2018 · Backend Development

Understanding MyBatis Initialization: Configuration Creation and Design Patterns

This article explains the complete MyBatis initialization process, detailing how the XML configuration file is parsed into a Configuration object, how SqlSessionFactory and SqlSession are built, and highlights the Builder design pattern used throughout the setup, with code examples for manual configuration loading.

Builder PatternConfigurationInitialization
0 likes · 13 min read
Understanding MyBatis Initialization: Configuration Creation and Design Patterns
Qunar Tech Salon
Qunar Tech Salon
Mar 22, 2017 · Mobile Development

Analyzing the Source Code of the Picasso Image Loading Library in Android

This article examines the internal implementation of the Android Picasso image‑loading library, detailing its singleton initialization, request creation, builder pattern usage, caching mechanisms, delayed loading, and the workflow of actions, handlers, and thread execution to illustrate how images are fetched and displayed.

Builder PatternCachingImage Loading
0 likes · 8 min read
Analyzing the Source Code of the Picasso Image Loading Library in Android
Qunar Tech Salon
Qunar Tech Salon
Jan 25, 2016 · Backend Development

Comprehensive Java Best Practices and Essential Libraries Guide

This article presents a detailed guide to modern Java development, covering coding style, immutable data structures, builder patterns, dependency injection, null handling, formatting, Javadoc, streams, publishing strategies, Maven configuration, CI tools, repository management, configuration automation, essential development tools, and a curated list of widely used Java libraries.

Builder PatternLibrariesbest practices
0 likes · 22 min read
Comprehensive Java Best Practices and Essential Libraries Guide