You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently do the same thing that's bad about Rails which is pushing people towards having a single concept of entity from the JSON API to the database table. E.g. for CRUD controllers, we use one name, e.g. notes that we then use for the controller's module name as well as to guess the name of the entity and the names of the functions to create, load, etc. entities.
We should have better separation here and use separate arguments for the controller name and for the entity name. In many cases both would be the same which would still not mean lots of additional effort for the developer (really just a few extra characters need to be typed) e.g.
cargo generate crud-controller notes Note
In some cases, the controller and entity names could also be different though, e.g.:
cargo generate crud-controller tasks Todo
The text was updated successfully, but these errors were encountered:
We currently do the same thing that's bad about Rails which is pushing people towards having a single concept of entity from the JSON API to the database table. E.g. for CRUD controllers, we use one name, e.g.
notes
that we then use for the controller's module name as well as to guess the name of the entity and the names of the functions to create, load, etc. entities.We should have better separation here and use separate arguments for the controller name and for the entity name. In many cases both would be the same which would still not mean lots of additional effort for the developer (really just a few extra characters need to be typed) e.g.
In some cases, the controller and entity names could also be different though, e.g.:
The text was updated successfully, but these errors were encountered: