Any tips on building web apps with Elixir?

Hey All,

I have been diving into Elixir & I am impressed with its speed scalability & fault tolerance features; I am planning to build a web application but I am still figuring out the best approach for structuring the project & choosing the right tools within the Elixir ecosystem.

I come from a Ruby background & I have taken a igmGuru Rails course in the past so my brain is still wired to think in the Rails way of doing things However I know Elixir and Phoenix have their own patterns & philosophies that I want to adapt to.

I am looking for is some practical advice from people who have built production apps in Elixir What kind of project setup do you suggest. How do you handle authentication testing & deployment in your projects Any tips on common mistakes to avoid would also be super helpful. Also i have see this 53) ElixirConf US 2018 – Building a Stateful Web Application with Elixir – Enio Lopes
Still need advice.

Thank you.:slight_smile:

1 Like

You may find this course useful:

It’s been updated to modern versions since I used it back in the day, but it’s a good introduction to “this Rails thing is spelled like THIS in Phoenix”.

2 Likes

Be sure to also check out all of the various Elixir Learning Resources > Books and Learning Resources > Courses and also browse some of the threads in this section as lots of people have asked for learning path recommendations based on their experience - there’s a very good chance one will suit you :023:

Hey there and welcome! You have a few options to build your web app, ultimately it comes down to what your app needs and what tradeoffs you’re willing to make:

  1. Traditional MVC (like Rails)
  2. Liveview
  3. Pair Phoenix with your JS frontend of choice using either Phoenix Channels or inertia.js

I’m guessing that you’re accustomed to the typical Rails way of doing things with MVC. In which case you can definitely have a similar approach with Phoenix. It seems though many in this community have gravitated towards Liveview to simplify things further. So I’d encourage you to take a look and see if it fits for your use case as it has benefits over the traditional MVC approach.

If you’re building applications that require more interactivity on the client and sprinkling in JS won’t really do, then I’d suggest pairing Phoenix with your JS framework of choice using either Phoenix Channels or inertia.js.

No matter what you decide, the official Elixir and Phoenix docs are very good. There are other books and courses that people recommend in the forums too.

Fwiw, I’d wager that the linked course above would likely be helpful. I happened to take a different course from the same author and thought he did a good job of helping me come up to speed quickly with Liveview even though I ended up choosing the 3rd option.

Generally, I think this community is very supportive. So if you have more questions as you get further into it, ask away.

1 Like

Hologram is another solution worth keeping an eye on. It’s early days for it but it has a wonderful vision and promising future.

It allows you to write fullstack Elixir without the latency compromise associated with Liveview. I’m hoping to build some projects with it later this year once it’s matured a bit more.

2 Likes