Skip to content

Correct Grouping of related Entities #632

Answered by illright
stsiushkevich asked this question in Q&A
Discussion options

You must be logged in to vote

I would recommend keeping the slices flat as long as possible, and only when it starts to overflow with slices, you can start grouping them. Note that when you group slices into a folder, they don't become one slice. In the case below:

  • entities/
    • Employee/
      • Person/
      • Group/
      • RoleGroup/
    • Identification/

The slices are Employee/Person, Employee/Group, and Employee/RoleGroup, and these slices are bound by the same rules as Identification, no code sharing is permitted between Employee/* slices.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@stsiushkevich
Comment options

@illright
Comment options

@stsiushkevich
Comment options

Answer selected by stsiushkevich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants