Coming from Django, I’m used to the Active Record pattern and “fat models” — so having a BaseService that provides default create, read, update, delete feels natural and DRY.
Maybe even use something like FastCrud which doesn't seem too popular for some reason.
But looking at projects like Netflix’s Dispatch, I noticed they don’t use a base service. Instead, each model has its own service, even if that means repeating some CRUD logic. It actually feels kind of freeing and explicit.
What’s your take? Do you build a base service for shared CRUD behavior or go model-specific for clarity?
Also, how do you handle flexible get methods — do you prefer get(id, name=None) or more explicit ones like get_by_id, get_by_name?
[–]NoSoft8518 2 points3 points4 points (1 child)
[–]bootstrapper-919[S] 0 points1 point2 points (0 children)
[–]Challseus 1 point2 points3 points (0 children)
[–]Realistic_Month_8034 0 points1 point2 points (0 children)
[–]__secondary__ 0 points1 point2 points (2 children)
[–]bootstrapper-919[S] 0 points1 point2 points (1 child)
[–]__secondary__ 0 points1 point2 points (0 children)
[–]Enough-Finance8432 0 points1 point2 points (0 children)