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

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
phykos
In Ruby, which is very similar to Elixir I do this: def test yield end test do puts("sup there") end Here, the yield keyword will be...
New
KSingh1980
How to run the random query and get the result in JSON format and send it as a response. The query will be in the following form DB Name...
New
Santheepkumar
Hi all, I am a Fullstack JS developer for last 2 years. I need a good guide to learn elixer. Any suggestions please
New
markdev
What are the best beginner resources for learning Elixir and OTP (not Phoenix) in 2018?
New
jace
I wanted to write a library for interacting with a Web API as a practical way of learning Elixir. However, there seem to be a lot of diff...
New
Fl4m3Ph03n1x
Background After following the communitiy suggestion, I bought the Elixir in Action 2nd Edition book and I am about to finish it now. I ...
New
gouvermxt
I just finished the “Learn Functional Programming with Elixir (Pragprog)” book. I have 5+ years of experience with Ruby/Rails, my goal is...
New
jsnoble
I come from a javascript background and I just starting learning elixir. I went through the basic tutorials but I want something deeper. ...
New
Fl4m3Ph03n1x
Background I am trying to do the typical Ceaser cypher exercise in Elixir. The description of the exercise is as follows: Create an impl...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement