Forem

Mykolas Mankevicius
Mykolas Mankevicius

Posted on

5 1

My Experience with Elixir Development

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
Enter fullscreen mode Exit fullscreen mode

It's something, but I personally think that Ash framework has something much better, and I hope that Phoenix will adopt it as well.

Image description

Adding Dependencies

Much better now with Igniter:

mix igniter.install some_library
Enter fullscreen mode Exit fullscreen mode

But without Igniter, it's this:

  1. Find the dependency
  2. Copy-paste the requirement into mix.exs
  3. 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:

  1. Hope the documentation covers the setup
  2. If not, search the web for setup instructions
  3. If nothing is on the web, try asking in forum/slack/discord
  4. 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:

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.

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (2)

Collapse
 
axibord profile image
Aghiles Lounis

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.

Collapse
 
neophen profile image
Mykolas Mankevicius

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.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay