I understood(edit: I assume) the importance of seperation of concerns and benifits in an application, But struggling to identify what are considered to be a concern (developer, feature, consumer or what ?).
I found this in stack overflow for what is SoC
One example might be a html developer might want to separate out html, css and javascript into separate files.
In the above idea of SoC, They're seperating based on languages, So they assume language are the concern, But in the context of react JSX and JS and sometimess CSS will be on same file here we set component as concern.
Lets say i have feature user management where it comes with Add User Remove, Update User...
For this feature i have to make service classes right ? As user is core feature of my application, It exposes variety of functionalities like user crud operations, authurisation services etc..
in this situation a single service named UserManagementService.java cant pack all the service, So how do i seperate the single service into multiple
My ideas were
- Seperating based on operation-----> UserReadService.java, UserUpdateService.java, ...
- Seperating based on consumer -------> CoreUserService.java, AuthorisationUserService.java, ...
Both seems valide seperation, How to identify which seperation suits my development.
I tried to identify which seperation suits the best in consumer pov, but cant figure out which is best,
The answer may be like it deponds on the service and use cases, If so what are the seperation concern grouping are working in long run in a java based monolithic backend development.