I've been doing Elixir development full-time for nearly two years now.
I love the language and the tools we have as a community. The creators and maintainers are doing a superb job of supporting, maintaining, and creating new things.
All of the following are just some observations I have coming from a different ecosystem.
LSP - The Thing That Makes Your Editor Do Wonders
We have great news that there is a team now working on an official LSP for Elixir. Please go and support these people as I am - even a $1 donation to all three people will go a long way if we get enough of us to donate.
Here's the blog post with more details
Until then, for VS Code users, just use elixir-ls
, and if you're using asdf
, make sure to have a .tool-versions
file in your project's root folder. It will work some of the time.
Project Setup
With LiveView 1.0, we finally got this, which is great to have in the docs. But it would be even nicer on the front page of Phoenix:
curl https://new.phoenixframework.org/myapp | sh
It's something, but I personally think that Ash framework has something much better, and I hope that Phoenix will adopt it as well.
Adding Dependencies
Much better now with Igniter:
mix igniter.install some_library
But without Igniter, it's this:
- Find the dependency
- Copy-paste the requirement into mix.exs
- Run
mix deps.get
Which feels very convoluted for something so simple.
Dependency Setup
Much better now with Igniter, if the library supports it.
Otherwise, it's:
- Hope the documentation covers the setup
- If not, search the web for setup instructions
- If nothing is on the web, try asking in forum/slack/discord
- If no luck, wait a few years and maybe you'll join a team where someone has made it work
Try setting up ex_cldr with gettext with a backend and interpolation.
There are so many things to figure out, it's not even funny.
I'm lucky I'm working with people who have done it, so I can copy-paste many things into my own projects.
I don't know why, but this feels very complicated at times.
The Docs
While very good in content, they are hard to understand as a beginner coming from platforms like Laravel, Nuxt, Next, or Astro.
LiveView
While it's an amazing technology, pray you don't need any complex components or infinite scroll with position restoration.
You'll soon learn about hooks and how difficult they are to work with if you don't understand JavaScript at an intimate level.
I don't have that problem as I love JavaScript and don't mind creating hooks. But it's night and day compared to working with something like Vue/React and their ecosystems.
Code Organization
It's challenging, and I still don't know how to do it properly. In the projects that I'm working on with Ash, this becomes much clearer.
Components
Delete core_components.ex and use one of these to save some time:
- https://mishka.tools/chelekom
- https://salad-storybook.fly.dev/welcome
- https://primer-live.org/
- https://woylie-doggo.fly.dev/storybook/introduction
- https://fluxonui.com/getting-started/installation
Other Resources
Overall
You need to learn a lot to really have a nice starting point. You have to read/watch many blog posts, Reddit threads, and YouTube videos about setup and related topics to ensure you're well-prepared to start.
Look at something like Laravel - a lot of information is right on the front page, and the docs connect many concepts. I understand that Taylor does this for a living; I just wish that our leaders could work on these things and make money from them too.
Again, I'm just noting these things down in hopes that people will prove me wrong and tell me what I've missed.
Top comments (2)
I find that the Ash framework is a bad abstraction. It might be a skill issue, but imo it's a terrible idea to integrate it into Phoenix.
Maybe you're right, at the moment it works i've only started using it for my project and streaming the results. If you're interested you can have a look here: The Mykolas youtube
It's a very steep learning curve and i don't know how much it will pay off.
But so far it seems great for the things i'm trying to do, and saves a ton of boilerplate.
This is always the case though with tools like these either you love it or you don't. It might be a skill issue of me not knowing elixir/phoenix concepts enough.