I'm working on a system with various CRUD services that handle domain objects like `user` and `post`, storing them directly in the database without any transformations or side effects. However, I'm facing a dilemma with more complex services, such as `SignupUser`. Should I keep the `signUp` functionality separate or integrate it with other complex services? I thought about creating an `AuthServices` module, but that doesn't seem to fit well domain-wise. Any advice on how to structure this?
1 Answer
It’s crucial to have clear data ownership in your services. For instance, your user service should directly handle user creation. If there are specific signup processes, those can utilize the user service but shouldn’t mix with other functionalities. When done right, your services should form a clear structure without circular dependencies—think of it as establishing boundaries.
I get the graph analogy, but can you clarify what you mean by "data ownership"? Is it just another term for separation of concerns?