Comments on: C# Design Patterns – Builder Design Pattern and Fluent Builder https://code-maze.com/builder-design-pattern/ Learn. Code. Succeed. Thu, 01 Aug 2024 10:33:10 +0000 hourly 1 https://wordpress.org/?v=6.7.5 By: MarinkoSpasojevic https://code-maze.com/builder-design-pattern/#comment-4735 Sat, 04 Dec 2021 13:08:33 +0000 https://code-maze.com/?p=47228#comment-4735 In reply to Sajid.

Thanks a lot.

]]>
By: Sajid https://code-maze.com/builder-design-pattern/#comment-4734 Sat, 04 Dec 2021 12:59:17 +0000 https://code-maze.com/?p=47228#comment-4734 Well explained article.

]]>
By: Marinko https://code-maze.com/builder-design-pattern/#comment-3141 Sun, 07 Mar 2021 10:46:48 +0000 https://code-maze.com/?p=47228#comment-3141 In reply to Diego Rönkkömäki.

It really can be done either way. As you said, for more complex examples with more parts to build, it can be useful to use another class to extract that logic.

]]>
By: Diego Rönkkömäki https://code-maze.com/builder-design-pattern/#comment-3139 Sat, 06 Mar 2021 11:42:47 +0000 https://code-maze.com/?p=47228#comment-3139 Good article. I can’t see the value of the Director class though. Smells like over engineering. I’d rather let the actual Builder do the building than have yet another type in the mix.

Maybe there’s a use case for it in a more complex setup?

]]>
By: Marinko https://code-maze.com/builder-design-pattern/#comment-2157 Sun, 19 Apr 2020 00:57:45 +0000 https://code-maze.com/?p=47228#comment-2157 In reply to Cipher Coder.

Thank you for the kind words. We appreciate that a lot. Best regards.

]]>
By: Cipher Coder https://code-maze.com/builder-design-pattern/#comment-2155 Fri, 17 Apr 2020 18:03:48 +0000 https://code-maze.com/?p=47228#comment-2155 Just Wanted to say a thank you– Good interface, and comprehensible code.. Thnx

]]>
By: Károly Ozsvárt https://code-maze.com/builder-design-pattern/#comment-1976 Tue, 28 Jan 2020 05:32:36 +0000 https://code-maze.com/?p=47228#comment-1976 For frequently mocked interfaces, mock builders can also be really useful. For example:

new RepositoryBuilder()
.WithUsers(new User[] { ... }) // sets up the IRepository.GetUsers() method
.WithProducts(new Product[] { ... }) // sets up the IRepository.GetProducts() method
.Build(); // returns the mocked object (IRepository) with the correct setups

]]>
By: Marinko https://code-maze.com/builder-design-pattern/#comment-1977 Tue, 28 Jan 2020 02:17:04 +0000 https://code-maze.com/?p=47228#comment-1977 In reply to Károly Ozsvárt.

Thank you for that. Best regards.

]]>
By: Marinko https://code-maze.com/builder-design-pattern/#comment-1659 Thu, 05 Dec 2019 10:28:00 +0000 https://code-maze.com/?p=47228#comment-1659 In reply to Pedro.

Hello Pedro. I am sorry you have a problem with the marked code, but it is not the point about being cool or anything, but just to point the reader at what has changed in the code. We really didn’t have any complaints about it. Anyhow, thank you for the suggestion.

]]>
By: Pedro https://code-maze.com/builder-design-pattern/#comment-1658 Thu, 05 Dec 2019 10:07:02 +0000 https://code-maze.com/?p=47228#comment-1658 Blue text on black background is very hard to read. I know it looks cool and all, but its hard to read.

]]>