Efficiency vs. Lucidty

I have this bad habit of looking down on anyone who boasts about optimisation & performance hacks - I am all about beautiful code. Low level hacking is beneath me.

If people have performance problems, I usually suspect they are using the wrong /high level/ abstraction - easy for me to say I suppose : )

Recently I have been thinking about Phoenix’s plug / pipeline system and how elegant it is versus the average OO MVC framework.

Of course FP lends itself to this type of design, but the luxury of not having to pool resources and share many things, is perhaps something which is mostly a gift from the BEAM.

Is the BEAM the biggest enabler of this type of elegant high level design? Are we seeing Phoenix copy cats on other platforms?

Having said all that, I am pretty sure there’s room for evolution of Phoenix also - that’s the cool thing about JS frameworks, you can see a lot of ideas bubbling up - are there any other approaches to web frameworks in the Elixir world?

are there any other approaches to web frameworks in the Elixir world?

Not using plugs?

Yeh - perhaps not…

I think @Crowdhailer has a web framework that doesn’t use plugs …

You might also look into how web apps are done in erlang.

1 Like

Yes, you can find it here. it’s quite experimental at the moment but making solid progress https://github.com/CrowdHailer/Tokumei

1 Like

Oooh, I wonder what kinda of patterns are used in the Erlang frameworks? That’d be interesting!

Using it with ruby on rails was one pattern …

But if all you need is request -> response type of an http web server (which I think is the only thing http is good for), I still think rack-like response building [status, headers, body] is okay. For how it’s done in erlang, see knutin/elli’s example callback.

2 Likes

If You are looking for web with Erlang, there is this video Building a web app in Erlang - yes you heard me right I said Erlang not Elixir from Garrett Smith.

1 Like