Classic three-layer (API / business / data layer)
Hand-rolledThe most common split: the API layer takes requests, the business layer holds rules, the data layer stores and fetches data, and upper layers call lower layers.
Best forSmall and medium projects, mostly CRUD, with a not-very-experienced team.
Avoid whenBusiness rules are complex and must evolve for a long time, and you want business logic fully independent of the database and framework.
The structure is simple, and a newcomer can understand it at a glance
Most framework tutorials and samples use this kind of layering
A small project only needs two or three layers, so it is quick to start
The business layer often depends on the data layer, so changing databases still affects it
As the project grows, code for one feature spreads across the layers
It easily turns into empty layers that only forward the call