Sign in
Log inSign up
jean joel Ntepp

7 likes

·

34 reads

3 comments

Lionel Owono
Lionel Owono
Apr 3, 2024

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

1
·
·2 replies
jean joel Ntepp
jean joel Ntepp
Author
·Apr 3, 2024

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
Lionel Owono
Apr 5, 2024

jean joel Ntepp

Thanks for you answer.

·