Iāve wanted to try out Phoenix ever since I heard the Changelog built their site on it. Yes, Iām very late to the party, version 1.0 of Phoenix, released in 2015. Thankfully Iāve found some time away from constant rewrites of this blog to dive into the framework. From what Iāve heard, if youāre a Ruby on Rails developer, you should feel right at home with Phoenix. The first thing I did was to watch their video on building a Twitter clone. With my excitement level high, I dove into the framework and have spent all week playing around with it. Here are my first impressions.
What makes me feel at home
At first glance, Phoenix feels very Rails-y. They werenāt kidding when they said youād feel at home if youāre a Rails developer. Right from the get-go, the Phoenix CLI commands feel like Rails commands e.g. mix phx.routes ā rails routes. EEx (embedded Elixir), which is the default templating language, feels like ERb. It has the same model view controller paradigm. And also the same āconvention over configurationā paradigm. One of the coolest things about Rails was that every project felt the same, so you knew exactly where to begin. Phoenix has that same feel. I could dive straight into the Changelogās Phoenix app and know exactly where their routes are. What their database schema looks like etc. With all the similarities to Rails, why even use Phoenix? Well, here are a few things that get me excited about Phoenix.
What I'm excited about
Channels are mind-blowing. In Rails, Action Cable achieves something similar. Both use WebSockets, with Channels you can choose to use long polling. Whatās fantastic about channels is the performance. The fact that Phoenix can support up to 2 million web sockets (on a 40core/128gb box) is impressive. I donāt think Iām ever going to have an app that scales to that. Nonetheless, this is some impressive engineering.
Next up is, out of the box telemetry, and a live dashboard (since version 1.5)! I love application monitoring, and I love that it comes for free! Phoenix is the first framework Iāve used that has all this stuff just baked in. Metrics with Phoenix are like metrics with StatsD combined with Prometheus. Theyāre easy to use around the codebase but discoverable in that you have to declare them upfront. Also, the live dashboard looks pretty damn good (screenshot below), as well as showing all the essential metrics. With all of this out of the box, it takes out another decision when building a site. The downside is that you need to set up some extra authentication to hide your dashboard in production, but there are docs for that: Phoenix Live Dashboard.
Finally, itās just been a joy building a Phoenix app. Since I have no idea what Iām doing, I get hit with a lot of errors or warnings. Theyāve been super helpful and often offer solutions. Phoenixās hot reloading is super snappy, and the default styling looks fresh. Iām not a front-end developer, so Iām always happy when a framework ships with default styles that donāt look like rubbish.
Conclusion
Itās only been a week playing around with Phoenix, and Iāve loved it. Iām learning Elixir at the same time, which has also been a fun, but challenging journey. Having worked with Clojure, Elixir reads a little easier. However, moving from object-oriented to a functional paradigm is tough. Thereās still a lot more for me to discover with both Phoenix and Elixir, and undoubtedly Iām sure Iāll find some feature that I wish it had. For those coming from Rails, Phoenix will feel right at home. So the next time youāre looking to build a new web application, I urge you to give Phoenix a try!

Top comments (1)
Hi Jon -- happy to see another Ruby/Rails convert! One thing particularly stood out to me about what you found challenging about Elixir and the functional paradigm having done some Clojure before. I've not written anything serious in Clojure, but am familiar with Rich Hickey and most of its features/ideas that Elixir borrows from, namely protocols.
How's the journey thus far? And what resources are you currently utilizing to get up to speed?
I don't know if you're using auth in your Phoenix app, but I wrangled with it for quite some time before landing on Pow which was straight-forward to set up. I tend to peruse the issues tab for a library when I need a question answered when I recently discovered that Jose and another contributor wrote and released an auth solution here: github.com/aaronrenner/phx_gen_auth. Coming from Rails, you may be familiar with Jose and his previous work on Devise, one of the most popular auth libraries in the Rails community.
Lastly, shameless plug. I recently wrote about why I love Elixir citing all the features borrowed from a bunch of languages that we both work with. It also includes a video/talk from Sasa Juric that makes Erlang/Elixir such a homerun - runtime observability, introspection and self-healing to name a few that just learning Elixir/Phoenix right out the gates doesn't really expose one to. Sasa, if you've not seen some of his talks already, is an Erlang and Elixir engineer that wrote my favorite book, "Elixir in Action": wulymammoth.github.io/posts/why_i_...