2 ms·
It might be an unnecessary layer but sometimes it might not be. By having structs that you persist and structs that are “bound” to business logic functions you
by nesarkvechnep 4y ago
It might be an unnecessary layer but sometimes it might not be. By having structs that you persist and structs that are “bound” to business logic functions you can have clean business logic and treat the persistence as a side effect, which it ultimately is.
If your application is a simple CRUD app, then yes, bubbling up Ecto schema structs to the vies is sufficient.