Amelia

Amelia

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:

Most Liked

jam

jam

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.

al2o3cr

al2o3cr

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”.

jam

jam

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.

Where Next?

Popular in Chat/Questions Top

satoru
I’m working on the “Bob” exercise on the Elixir Track in Exercism. I am testing for uppercase letter with this simple check: c in ?A..?Z...
New
wolfiton
Hi everyone, How can i retrieve the name from a structure like this? %{"id" => "1570", "name" => "Croque Monsieur"} My test loo...
New
loganhelms
A while back, I read a great book by Luis Atencio titled, Functional Programming in JavaScript. In section 7.3, he discusses memoization ...
New
mchean
I was wondering if anyone is using some learning tools that they can recommend? I’ve been looking at two specifically so would also be ...
New
tom_s
Hello Elixir Community! I’m new to functional programming in general and to Elixir in particular but I’m very intrigued and would like t...
New
asfand
I am Asfandyar from Pakistan. This is my first time to the forum. I develop PHP websites using CodeIgniter, which is super easy to learn...
New
wallyfoo
Long story short, I have a real world need to create a view for hooking up a shipping terminal to live data, but because of some early ar...
New
Nvim
Anybody know of a Pragmatic Studio 40% off coupon code for video course like Phoenix?
New
jslearner
Will learning Erlang really help in being a better Phoenix or Elixir developer or is it a waste of time?
New
pdgonzalez872
Do we have a list of academic/research papers: about Elixir/Erlang? that use Elixir/Erlang? about the Beam? If so, could you please po...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement