3 ms·
Channels are great, LiveView is good, Plugs are elegant, although one thing I don't quite like are Contexts. Actually a lot of its strength come from using Elix
by conradfr 4y ago
Channels are great, LiveView is good, Plugs are elegant, although one thing I don't quite like are Contexts. Actually a lot of its strength come from using Elixir & the Beam.
For everything else I still feel it's inferior to my other framework of choice Symfony (well ok ... maybe not regarding Ecto vs Doctrine, but "transparent" caching would have been nice).
- 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.
- deleted 4y ago[deleted]