Hi everyone, I’ve been thinking about Phoenix and its evolution, and I wanted to share some thoughts.
Remember how Phoenix was heavily influenced by Rails when it first came out? The routes, models, views, controllers, and overall structure felt very familiar to anyone coming from Rails. Then they added contexts, which was a bit of a deviation, but still, many of the core concepts remained Rails-like.
Now, with LiveView, Phoenix has really carved out its own identity. It’s exciting to see how it’s evolving, but I can’t help but wonder if we’re still carrying some unnecessary concepts from the Rails world (disclaimer: I love Rails).
Don’t get me wrong—I think it’s great for beginners, especially those coming from Rails or similar MVC frameworks. They can pick up Phoenix quite quickly. But here’s the thing: Elixir is a functional language, and sometimes I feel like the current design doesn’t fully embrace that.
For example, instead of having an EventController (which would be EventsController in Rails), what if we had a more generic Controller module that we could pass our “events” table or other data to? It feels like that would be more in line with functional programming principles.
What if we had a framework that wasn’t influenced by any other framework at all? Not copying directory structures or naming conventions from other frameworks. Instead, imagine a library of modules and functions that we just pass data to. We could have a Route module where we pass in a link to create a route, a Controller module (or whatever we decide to call it) where we pass in the data and get the desired result. Functions from these modules could be piped into each other, forming a pipeline that handles everything from security to serving the request.
I think a library/framework like that could be easier to understand and reason about.
What do you all think? Is there already a library/framework out there that works like this? Would something like this be useful, or am I just overthinking it? I’m curious to hear your thoughts!