Earlier quoted context omitted.
Yeah, one of the worst practices. I've been working with Elixir professionally for 6 years now and I still see this sh*t everywhere. Bad APIs, bad UIs because someone coupled themselves to the database structure and can't escape. List of memberships? Keep them as a list with the same fields as the junction table. Top-level APIs taking maps with string keys as "params" so they can very easily be cast for a changeset.
This was the only out of box solution when Elixir didn't support types. So, if you really did Elixir professionally for 6 years, you'd know that by now. > Bad APIs, bad UIs because someone coupled themselves to the database structure and can't escape. If you don't commit yourself to the database structures you defined at the time of application creation, then it just reflects poor planning and architecture overall as…
This lets you evolve each part independently and use the "native" types frontend vs backend, which happens surprisingly frequently as the app grows