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

MiKo_1401 relaxed for questionable CleanArchitecture naming convention #949

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RalfKoban
Copy link
Owner

I do not agree with the namespace separation done by projects claiming to follow the Clean architecture.
They propose to separate based on type kinds (such as controllers, interfaces, events, exceptions, classes, etc.)

In my opinion the focus is placed wrong here. Instead they should more focus on features. With the focus above the different types are placed together, so all controllers in a single namespace, all interfaces in another one, events in a different one etc.

In my opinion interfaces, events, exceptions, controllers, domain entities etc. should be separated based on the functionality.
So in case an interface defines a method that shall throw an exception or raise an event, those specific exceptions and events should be placed within the same namespace as the interface. However, the namespace should neither be named "interface", "exception" nor "event"; instead it should be named based on the functionality to accomplish.

However, some still follow the imho wrong pattern of separating by type kinds, thus MiKo_1401 should be relaxed a bit.

@RalfKoban
Copy link
Owner Author

@CodiumAI-Agent /review

@CodiumAI-Agent
Copy link

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

Code Comment
The comments on lines 36 and 116 question whether certain namespace types should be acceptable. It would be better to resolve these TODOs before merging to maintain clarity and avoid ambiguity in the codebase.

Namespace Inclusion
The addition of specific namespaces like 'API', 'Domain', 'Controllers', etc., on lines 37-41 and 117-125, which were previously removed, should be justified with clear reasoning why they are now considered non-technical, aligning with the PR's goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: On hold
Development

Successfully merging this pull request may close these issues.

2 participants