Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why package by feature first and then by layer? (garrettdbates.com)
4 points by garrettdbates on July 20, 2024 | hide | past | favorite | 1 comment


There was a comment on HN where each feature was implemented in a fresh folder. Since then, I had always wanted elaboration on that. For me, the name to look for now is "vertical slicing."

This also reminds me of James Shore's nullables [1], where infra and logging are also unit-testable. Having a slice for each feature could help evolve the system organically as patterns emerge over time.

Combined with that, a recent post on database design [2].

[1] https://www.jamesshore.com/v2/courses/testing-without-mocks

[2] https://news.ycombinator.com/item?id=41013519




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: