3 ms·
I think that the package ecosystem is well developed, and getting better every day. For the most common things, there's already packages out there. You want to
by ryanbigg 10y ago
I think that the package ecosystem is well developed, and getting better every day. For the most common things, there's already packages out there. You want to talk to a database? Use Ecto. You want to check code quality? Use Credo. You want to respond using JSONAPI? Use ja_serializer. You want to talk over HTTP to something? Well there's two main options out there (HTTPotion and HTTPoison).
If you can't find a package then you could try looking it up at https://github.com/h4cc/awesome-elixir https://github.com/h4cc/awesome-elixir or asking on the elixir slack (https://elixir-slackin.herokuapp.com/ https://elixir-slackin.herokuapp.com/) or on the #elixir-lang channel on Freenode.
After all that if you can't find a package that suits your needs then it's very easy to create one. "mix new (your project)" and away you go.
That's what I did with my elastic package (https://github.com/radar/elastic https://github.com/radar/elastic) when I couldn't quite find something that suited my exact needs. There's Elastix and Tirexs out there (those are the ones I know of) but neither really suited what I needed, so I just built my own.
I don't know how it could be a deal breaker if a package didn't exist already. I'd encourage you to build whatever you don't find already existing and contribute back to the community.
- bpicolo 10y agoMan, there are things I like about Ecto but for anything beyond simple selects the documentation is lacking and the experience is kind of painful. As an example, I hit the issue recently where a changeset wouldn't accept nil for a relation via put_assoc. That seemed like an very trivial problem to be hitting for a project that's been around so long. And I hit a number of issues that had that sort of feeling. Another thing was that, if you update a thing with new relation data, you have to force-reload the relationships from the database again. That was pretty surprising and seemed like it should be unnecessary. I think there's room for an Ecto alternative that tries to be a bit less fancy and gains a lot because of it.