7 likes
·
34 reads
3 comments
·Apr 3, 2024
Apr 3, 2024
Hello good article, can you please explain de difference with factory pattern ?
1
·
·2 replies
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.
·
·Apr 5, 2024
Apr 5, 2024
Thanks for you answer.
·