---
title: "Discussion on \"Design Pattern :  Builder\" | Hashnode"
description: "Discussion on \"Design Pattern :  Builder\". Understand when and where to use Builder pattern and code it in Java or use Lombok"
url: "https://hashnode.com/posts/design-pattern-builder/660cff0a17f8896b8b481d8d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Design Pattern : Builder](https://blog.nameksoft.xyz/design-pattern-builder?utm_source=hashnode&utm_medium=feed)

Understand when and where to use Builder pattern and code it in Java or use Lombok

Apr 3, 2024 · 5 min read · blog.nameksoft.xyz  
Read the article

-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#builder-pattern](https://hashnode.com/tag/builder-pattern)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#clean-architecture](https://hashnode.com/tag/clean-architecture)
-   [#java](https://hashnode.com/tag/java)
-   [#lombok](https://hashnode.com/tag/lombok)

## Written by

[jean joel Ntepp](https://hashnode.com/@nameksoft)

@nameksoft · Paris, France

  
[View profile](https://hashnode.com/@nameksoft)

Software developer

## Responses 1

Markdown supported · ⌘↵ to post

[Lionel Owono](https://hashnode.com/@lionelsan)

[Apr 3, 2024](https://hashnode.com/posts/design-pattern-builder/660cff0a17f8896b8b481d8d/comment/660d4696c703f55f72dee4fd)

Hello good article, can you please explain de difference with factory pattern ?

[jean joel Ntepp](https://hashnode.com/@nameksoft)

[Apr 3, 2024](https://hashnode.com/posts/design-pattern-builder/660cff0a17f8896b8b481d8d/comment/660d4696c703f55f72dee4fd#reply-660d5fde2ee17ec83e73a88d)

Hi Lionel, thanks for interacting.

Both patterns belong to the family of object construction patterns. The Factory pattern is useful when you want to create different types of objects from a class (a dedicated factory). The Factory class generally relies on conditions to determine which type of object to build.

It's the expression "different types of objects" that marks the difference between the two patterns. In the case of the Builder, built objects are always of the same type.

[Lionel Owono](https://hashnode.com/@lionelsan)

[Apr 5, 2024](https://hashnode.com/posts/design-pattern-builder/660cff0a17f8896b8b481d8d/comment/660d4696c703f55f72dee4fd#reply-660ff16d8324a8375390312f)

[jean joel Ntepp](https://hashnode.com/@nameksoft)

Thanks for you answer.
