-
Notifications
You must be signed in to change notification settings - Fork 74
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
Why to use separate ProductId classes for different parts of the system? #1
Comments
I prefer the "share nothing" philosophy. IMO a bit of duplication is better than a shared lib that needs to be maintained, versioned, ... |
@ttulka , I understand your points, but I see the examples you are giving can be handled by abstractions. In general, I think if the domain layer represents the model of the business/problem, the components of it correspond to the real-world concepts related to that business, therefore, should be consistent throughout the application. For instance, it makes more sense for the These are my views on the topic. I would be happy to hear your objections against these arguments. |
@elnurvl I am not sure, what you mean by "abstraction"...? If you mean an interface |
I see the
ProductId
is always implemented the same way regardless of being used in different subdomains. So what is the motivation behind code duplication?I also noticed that the
...Id
classes are implemented with the same logic in general. Wouldn't it be better if we had an abstractId
class and the concrete classes inherited from it?The text was updated successfully, but these errors were encountered: