Re:Rails adds support for Fiber-safe ActiveRecord Connection...
by berkes on Friday February 25, 2022 @04:51AM
(#30465482)
I'm not experienced in Django.
But doing this in Rails is very hard. It goes against the most strongest of opinions this opinionated framework has. So much, that if you strive for such a design (and you should, IMO) Rails is more in the way than helping you - I know, I tried.
Re:Rails adds support for Fiber-safe ActiveRecord Connection...
by skrtskrt on Friday February 25, 2022 @01:40PM
(#30470589)
Sure, writing boilerplate is always going to have overhead.
But in my experience the stricter-yet-more-verbose design strongly increases maintainability and velocity in the long term, which should be self-evident due to the massive reduction of coupling.
> Marshall ORM objects into true Domain objects
> Do not call to the database in the HTTP adapter/validators
The tradeoff for this is exploding the number of files, directories, and tests, needed for the project. Which has its own cost and overhead.