4 ms·
- Ecto is still a climbing hill for me. In fact I'm currently trying to warp my head around changesets and associations. - Same for GenStage. I wanted to use t
by conradfr 8y ago
- Ecto is still a climbing hill for me. In fact I'm currently trying to warp my head around changesets and associations.
- Same for GenStage. I wanted to use them for workers pulling from an episodic queue but the docs with the emphasis on consumers pulling multiple events at once from a never ending stream didn't really speak to me. Tailoring to my usage looked verbose: storing demand etc. I'll have to revisit when I'm better at Elixir.
- I still think caching should be part of Ecto in some way, at least in the docs.
- I would still like more straightforward template inheritance in Phoenix (think Jinja2, Twig).
Excited for the future releases of Phoenix 1.4 and Ecto 3.
- pythonaut_16 8y agoI'm not sure exactly what made Ecto click for me, but once it did, it quickly became my favorite ORM/data mapper. Have you read some of the Plataformatec blog posts about Ecto?
- tortilla 8y agoI thought similar but once Ecto clicked for me, everything else felt clunky. I don't know what was the exact cause but using it for a real project helped. Also Programming Ecto is great. https://pragprog.com/book/wmecto/programming-ecto https://pragprog.com/book/wmecto/programming-ecto
- BenMorganIO 8y agoChangesets are great. I was hesitant when I first used them coming from Rails, but they're very useful. Combined with the contexts, they help remove the need for implementing ActiveRecord callbacks; which caused a lot of problems with Rails apps as they aged.
- dnautics 8y agoI had a hard time with those too! However, changesets are really awesome. Easiest, bastardized intro is to think of it as preventing a trip to the database/data sanitization before doing any sort of state modification. Then if you stay open minded later you will learn other things that it can do as you along.
- pdimitar 8y agoA changeset is basically an accumulator object that contains both a diff and DB operation specifics. It basically says "I have to change this object's 3 fields to the following values and then perform a DB update". It can also contain validation errors. And... that's all there is to it. And you can use it without a database. It's perfectly useable when you accept external data and want to inspect how would it modify your state. No persistence need be involved. For everything else, poke us at ElixirForum. People are helpful there.