News for hackers. Stuff that matters.
Re:Zendesk to be acquired by jeffdn on Thursday July 21, 2022 @02:03PM (#32182657)
It has so many built in footguns, however. For instance,`SerializerMethodField`, in conjunction with a list endpoint, can generate a huge number of queries if one doesn't prefetch appropriately, and this issue is very difficult to catch with a linter. Granular test coverage is difficult because the testable unit is the ViewSet or the Serializer. I think DRF is great for rapid prototyping and early stage development.

In the long term, with a lot of complexity and a large organization, a more mature architecture that relies on components that wrap tables, composed together to form components that wrap business logic, which are composed into endpoints. Something like that is much easier to test and more scalable for disparate teams to step into and understand.

Re:Zendesk to be acquired by SEJeff on Thursday July 21, 2022 @02:37PM (#32183088)
Can you point out a better generic framework for this? And starlette doesn’t count as Tom Christie is the author of both.
Re:Zendesk to be acquired by jeffdn on Thursday July 21, 2022 @04:21PM (#32184483)
I haven't found one, unfortunately -- just setting team-wide architecture policies, and then using linters extensively to make sure those policies are adhered to.
Re:Zendesk to be acquired by SEJeff on Thursday July 21, 2022 @04:35PM (#32184657)
That's my experience as well. There isn't a nicer one than DRF / Starlette, but for a specific use case, you can get away with a custom one no problem.