2 ms·
> I don't quite like are Contexts A while back I wrote a small guide on how to design your contexts and its queries for flexibility. Not sure if this will actu
by sph 4y ago
> I don't quite like are Contexts
A while back I wrote a small guide on how to design your contexts and its queries for flexibility. Not sure if this will actually answer some on your issues with them.
https://elixirforum.com/t/a-design-pattern-for-more-flexible-context-apis/29238 https://elixirforum.com/t/a-design-pattern-for-more-flexible...
- conradfr 4y agoYes it's not bad! I guess I dislike the code that the context generator produces. A bit like the auth generator that forces you to commit code you didn't write and that is basically a mess to upgrade, and frankly not that great to modify to suit your needs.
- sph 4y agoI really dislike how the auth system is implemented, that it is only accessible with a generator. I had a crappy auth system I wanted to migrate to it, I had to run the generator and try to update my code with the generated logic. Ugh, not fun. But regarding contexts, they're just modules. Nothing mandates them, it's just a best practice to collect database functions in their own module, whatever the language. I've never used the context generator.