quda

quda

Non-MVC web framework?

I am wondering if are there other reliable web frameworks in Elixir that are not based on MVC design pattern ?
Maybe something based on MVVM or multi-tier ?

PS: I know Phoenix is great, but not for everybody, sometimes seems rigid, cumbersome… so please don’t insist to convince me about it, I just want to experiment other flavors of web dev/Elixir.

Thanks! :roll_eyes:

Marked As Solved

quda

quda

Just an update (closure) to this topic.

I set my own stack and modus operandi for web dev w/ Elixir:

  • I use plug_cowboy on the backend to manage the web server operations, routes, REST etc.
  • Also on the back-end, the connection to the ArangoDB (a non-SQL db engine) instance is realized through Arangoex - wrapper/adapter.
  • Front-end is developed using Vue.js (I transplanted the SPAs from old Node framework we used)
  • Created my own/custom functions that somehow act as controllers - this took a lot of effort, time.

Notice that everything is at minimums, extra-light.
It took a lot of time and frustration to set all of these, but we are very satisfied now, it runs blazing fast, it’s light, easy to manage, didn’t need that bloatware of Phoenix. I know, this is not a solution for everybody, has limitations, it just fits our purpose.
If one need an out-of-the-box, full framework, he should probably use Phoenix. Nevermind the learning curve… :hocho:

Cheers,
Q.

Also Liked

lpil

lpil

Creator of Gleam

Hello!

If you’re happy to go for something a bit more modular and convention based there are lots of options.

One these might fit your preferences. Personally I quite like Elli

jack

jack

Since cowboy and plug_cowboy was suggested (and used as solution), I would like to suggest Bandit and Thousand Island.

The naming might be bad haha but I’m very interested in those two projects, the ideas behind them are great and there is also a great presentation I saw some time ago. I see a lot of potential on it.

Thousand Island is an alternative to Ranch, and Bandit is an alternative to Cowboy.

You can check the project here: ElixirConf 2021 - Mat Trudel - bandit on the loose! Networking in Elixir demystified - YouTube

trarbr

trarbr

Just to list some more alternatives:

  • Aino: An Elixir HTTP framework built on top of elli
  • MochiWeb: An Erlang library for building lightweight HTTP servers.
  • Webmachine: A “REST toolkit” - it is an application layer that adds HTTP semantic awareness on top of MochiWeb, see the Webmachine Overview for more

I have not used any of them, but I do know that Webmachine is quite different from MVC.

There is also another one in Elixir, but I can’t think of it right now. It’s very DSL-driven, meant to remove a lot of boilerplate, and supports both REST and GraphQL APIs… I can’t remember the name right now though

stevensonmt

stevensonmt

I’m glad you were able to work out a solution. It would be great to see an example of your setup. I don’t think it’s fair to refer to Phoenix as bloatware, even if you did not find it to be the right tool for you. It would be nice to maybe see a comparison of performance benchmarks and compiled binary sizes between your setup and Phoenix.

cmo

cmo

Have you tried LiveView? It’s not too rigid. No pesky controllers!

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
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
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New

Other popular topics Top

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
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
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
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
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