Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KISS principle & fluent builder pattern #763

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

aminsharifi
Copy link

If it's good practice, may I do the same for the rest of the project's setters?

Copy link
Collaborator

@KyleMcMaster KyleMcMaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious as I try to understand the changes being proposed here. How does the KISS principle apply to having SetSomeProperty methods (potentially many methods if you're doing them individually)? Doesn't introducing setter methods make the Constructor, which itself is a setter, more complex?

@aminsharifi
Copy link
Author

I'm just curious as I try to understand the changes being proposed here. How does the KISS principle apply to having SetSomeProperty methods (potentially many methods if you're doing them individually)? Doesn't introducing setter methods make the Constructor, which itself is a setter, more complex?

Hello Kyle,
Thanks for your review
I wanted to bring to your attention that three commits have been made with the intention of following the KISS, DRY, and CQRS principles. Regarding the first commit you mentioned, I agree that it may not fully adhere to the KISS principle, but it does demonstrate the DRY principle. Specifically, the line Guard.Against.NullOrEmpty(name, nameof(name)) appears to be duplicated in both the constructor and the UpdateName method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants