Hi @memoria-guy ! Welcome to the community!
Letâs break things down so I can address (with my opinion) your questions:
how do you all feel about/deal with the lack of third-party libraries for Elixir and Phoenix?
This is a valid question. We usually see these when folks come from other ecosystems that are more âbatteries includedâ. It is good to know your (new member, without our communityâs biases) perspective, so thanks for asking. We all have biases and they tend to creep in as time goes by. We often forget how things were when we were first exposed to something new. Expert bias is real and it is great to have input like yours.
Disclaimer: In no way I am saying anything about your skills or anybodyâs skills. I am just giving anecdotal (mine) evidence and discussing my experience, which is what @memoria-guy asked for.
The biggest shift in perspective in this âlack of librariesâ discussion happens when someone starts reading the apiâs documentation rather than the libraryâs documentation (a readme with tons of examples for example). Maybe you wanted something that the library didnât support, maybe the library became a bottleneck (happens quite a bit), maybe you just got curious and started to peek under the hood. Once this shift happens, you start to give less value to the pre-built libraries because they start to become less magical. Ultimately, you start thinking about problems from the bottom up: âWait, all this does is send a request to a url?â. This is what happened to me at least, ymmv. The code goes from:
token = "some token"
headers = "Headers"
client = ThirdPartyLibrary.new(%{token: token, headers: headers})
payments = client.get_payments()
to:
token = "some_token_from_another_request"
url = "https://example.com/api/endpoint_that_needs_a_bearer_token"
headers = ["Authorization": "Bearer #{token}", "Accept": "Application/json; Charset=utf-8"]
{:ok, response} = HTTPoison.get(url, headers, [])
The snippet above comes from HTTPoisonâs readme. Another good library for http requests is Req
Let me get back to the question, I feel like Iâm going on a tangent a little, but I thought this context would be beneficial.
To me, the real value these libraries offer comes down to the readmes and examples they provide. They tend to offer A LOT of examples, guides and warnings about common gotchas. Issues in the repo also seem to help a ton. Itâs not the library itself, itâs the documentation, support and help you get from using the library. I hope I am making sense here.
So, letâs address what IMO is the root cause here: having the documentation, support and help when you are building things. Iâll list a few places (they are all listed on the website: https://elixir-lang.org/). This is where I go for help when needed and honestly, learn a ton just by reading discussions:
- ElixirForum (you are doing this already! )
- Elixir Slack (browse the channels, there is usually a âthe library/api I
wantâ channel)
- Elixir IRC
- Blog posts from the community (#MyElixirStatus is a great aggregator on Twitter)
Now, with that out of the way, here comes a plot twist: For the exact reason you asked this question I think there are benefits (biggest value add is to newcomers and folks that are considering using Elixir for their projects) to having these âgo-toâ libraries. Even if they donât end up being used in favor
of hitting the apis directly at some point in their journey.
With this in mind, letâs address the other concerns you mentioned above:
S3 client (.NET and Ruby both have an official one)
What about using aws-elixir or ExAws? Both work very well. The former is auto generated from the output of a Go official SDK (and is what Iâm using in small projects) and I know the latter is used in many production applications in large companies.
You pointed out that there are some official SDKs. I went ahead and asked what the process is here: www.reddit.com/r/aws/comments/qjvh9f/official_sdk_for_elixir to get one of these auto generated ones (the two you listed are auto generated) since if you were able to spot this (and feel less confident about
Elixir) others may have as well.
We have one of these auto generated libraries for Google and as I mentioned above, the real value comes from the documentation, support and examples you get from these libraries. Google has solved this by creating an additional repo that is supported by the community.
As far as documentation and examples, we can always try to help out build that knowledge base regardless of the size of the contribution.
Auth (Auth0, Firebase, Azure B2B are all contenders)
Have you looked into the built-in Auth generator that comes with Phoenix 1.6? Here is an awesome blog post about it: An upcoming authentication solution for Phoenix - Dashbit Blog. IMO this should be the go-to for now projects, but you should make your wn decisions A generator that adds everything you need, created by folks responsible for Devise and audited by security specialists is good enough for my needs, ymmv.
Auth0 remains a good option as well, they have great docs on how to interact with their api. I saw how Elixir doesnât have a quickstart app so I requested it (you need to search for âElixirâ, then they give you an option to âSuggest a New Quickstartâ).
Also, I emailed them at âhello@auth0.comâ and asked about an Elixir example/tutorial/SDK. Letâs see what they say.
Stripe (I know there is an unofficial Elixir one but I am worried about using
an unsupported SDK for something as sensitive as payments)
As you mentioned, there are a couple of unnoficial Elixir libs out there, but ultimately, they are all hitting the extremely well documented Stripe api.
Here is an example of a Stripe client from Dashbitâs open sourced project Bytepack
Maybe this will get you closer to where you need to be with integrating with their API.
Thanks for saying hi and asking these questions! Welcome to the community! Please let me know if you have any questions, happy to help.
Edit 1: The reddit link was broken (seems like the Forum blocks it somehow?). My post has been approved and seems to be up now: https://www.reddit.com/r/aws/comments/qjvh9f/official_sdk_for_elixir/