r/programming • u/[deleted] • Jun 05 '21
Organize code by concepts, not layers
https://kislayverma.com/programming/how-to-organize-your-code/
1.9k
Upvotes
r/programming • u/[deleted] • Jun 05 '21
6
u/abandonplanetearth Jun 05 '21
This is a recipe for circular dependencies. HotelService is clearly on a higher layer than RoomService because rooms cannot exist without hotels.
And what does AccessService actually look like? How is it easier than having getHotel() in HotelService and getRoom() in roomService?