Using lightweight libraries/tools instead of Phoenix

The one file example is extreme of course, but you don’t need to put eveything into 1 file, but can organize the project as you want even using Phoenix, just skip the generators (, that’s what I meant. :slight_smile:

The dependencies that Phoenix gives you will be the ones you’ll end up writing anyway, but use the ones you need and skip the rest. But if you still really want the simplest thing, just use plug_cowboy.

I think the reason we haven’t seen projects in the Sinatra like space it’s because those type of frameworks (I used to use KoaJS and Flask) aren’t as used as they used to be, so there isn’t as many people comming from other languages trying to mimick the same in Elixir. Also Phoenix is probably the biggest drawing point for Elixir, I mean, I guess it’s because of Phoenix that a lot of folks try Elixir in the first place, so it makes sense they stay, specially because Phoenix gives you thing’s that other frameworks generally don’t, easy realtime (Channels), LiveView (different paradigm), which are not trivial to replicate on your own, so it makes sense to stay.

1 Like

Small mod comment: This thread has some really high quality discussion, which is great! Thanks everyone for doing a good job making thoughtful replies.

Some of the disagreement here definitely comes down to what people consider light or heavy weight. If that ends up being a sticking point that the thread loops on unproductively I’m going to start to suggest we call it “done”.


I’ve seen it happening with a group of some of the best (and >15 years experience each) developers I know. They chose Flask because the project did not need all features of Django, and Flask allowed them to build everything around it tailor made: no magic, all very explicit and very very good code… Documentation was written with good intentions. Each change was reviewed by at least 1 other developer.

But then:

  • the project was a success; more features were implemented and as the feature set grew, so did the code base. Django was rejected for featuring the things that now had to be tailor made. But as it happened gradually, there was never a good moment ROI wise to switch to Django.

  • currently it is an enormous code base which takes new devs months to ‘get into’ due to the sheer size. The team is in the process of downsizing it…by using 3rd part providers (guess they are cured of the Not Invented Here syndrome)

  • it appeared later on that documentation was riddled with missing “unknown knowns”. They only found out as soon as a new person joined the project and those who had the “unknown knowledge” were far gone.

  • no large community with people knowing the same core code base.

So no, it doen’t only happen with unexperienced devs wanting to be clever. It happens also to those experienced devs. Those who eat code and standard specs for breakfast. Who can do without the magic, document every function, etc…those X10 devs. Those…others….

ps: I think it tends to happen more by experienced devs that try to do it themselves as they think they can do better, think they follow every good coding practices and want to master their own explicit code. Maybe not being smart makes you do smart things :wink:

“I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates


Agree. Let’s consider it “done”. I might create another post when I’ve gotten anywhere with my experimentation and have some specifics to show for discussion. Don’t have any ideas when and if I ever will get to that since there’s always something with higher priority going on.

Anyway, thank you again for everyone chiming in and have a wonderful Elixir experience!


Not at all, you’re quite articulate in fact. I’d still opine that we are kind of arguing semantics and definitions of words while mostly sticking to our own viewpoints, back and forth, which as Ben said will lead us nowhere.

In the end, none of us has any power over you, most of the posters here are just warning you about the emergent properties of the “fine I’ll do it myself” approach and I think this thread can probably be best summarized as:

“The road to hell is paved with good intentions.”

That being said, I’ll be curious about your insights on how does your pursuit for less [Phoenix] dependencies is going, in the future.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.