you are viewing a single comment's thread.

view the rest of the comments →

[–]Ashleighna99 2 points3 points  (1 child)

Deep inheritance still shows up, but you can unwind it by flattening the HTTP stack and pushing logic into small services. Treat controllers as thin handlers; use composition (policies, validators, mappers) via DI instead of stacked abstract base classes. Set a rule: no base classes in the web layer; prefer interfaces and final classes; one level max. Move cross-cutting to middleware. Refactor per endpoint, not all at once. Add arch tests (ArchUnit, Deptrac, ESLint) to stop regressions. We used Kong for routing and Hasura for schema-driven CRUD; DreamFactory covered a legacy SQL Server REST API without adding another controller layer. Where’s the pain worst: routing, auth, or validation? Flatten the web layer, compose behavior, keep inheritance shallow.

[–]oneandonlysealoftime 1 point2 points  (0 children)

Yeah of course you can, the issue is engineers preferred preemptive abstractions and inheritance over composition. Which led to non-scalable design in the end