Tech debt - service dao layers for api #921
Labels
API
Related to the backend api server written in Go
discussion
Raises questions that are up for discussion
Projects
Issue
The db is the core area passed throughout the code base. Nothing is currently broken away into segregation of layers. This poses the downside of everything being mixed together. In some places this is fine however in some places I've noticed it has lead to duplication or more confusing flows. For the long term stability and improvement of the product I'm suggesting to use the service & dao layered architecture.
Fix
Refactor (over time) and introduce new code guidelines to use the service dao layer for the application. commonly called service and repository in the go world. This doesn't need to be done overnight. Enforcing a coding standard going forward will lead to gradual refactorings over time. And areas which are less commonly touched can be broken out specifically in smaller chunks and PR's.
Benefits
Faster change, better centralization of logic easier to break away from the api in the future if ever desired.
The text was updated successfully, but these errors were encountered: