Skip to main content
deleted 20 characters in body
Source Link
Korey Hinton
  • 2.7k
  • 3
  • 22
  • 30

Permissible?...yes

I would break-up a User class into parts in cases where it might need to scale really big.

Model Breakdown Example (Composition):

User HAS

  • UserLoginCredentialsLoginCredentials
  • UserContactInfoContactInfo
  • UserFavoritesFavorites
  • UserFriendsFriends
  • UserRolesRoles

Permissible?...yes

Model Breakdown Example (Composition):

User HAS

  • UserLoginCredentials
  • UserContactInfo
  • UserFavorites
  • UserFriends
  • UserRoles

Permissible?...yes

I would break-up a User class into parts in cases where it might need to scale really big.

Model Breakdown Example (Composition):

User HAS

  • LoginCredentials
  • ContactInfo
  • Favorites
  • Friends
  • Roles
Source Link
Korey Hinton
  • 2.7k
  • 3
  • 22
  • 30

Permissible?...yes

Model Breakdown Example (Composition):

User HAS

  • UserLoginCredentials
  • UserContactInfo
  • UserFavorites
  • UserFriends
  • UserRoles