6 ms·
After working with the PETAL (Phoenix, Elixir, TailwindCSS, Alpine.Js, Liveview) stack at $JOB for a while now, I have to say I've never been more productive.
by nyxcharon 4y ago
After working with the PETAL (Phoenix, Elixir, TailwindCSS, Alpine.Js, Liveview) stack at $JOB for a while now, I have to say I've never been more productive.
Early on I would still have to lean on Alpine heavily for various JS interactions but with all the features Liveview has been adding and improving on (Hello JS module!) I find myself needing it less and less. Liveview really has been a game changer for me. Tailwind has more or less fixed most of my frustrations with CSS and has worked itself nicely into the company design system resulting in nice re-usable components that can be easily customized for those one-offs. Elixir is a nice language to use and I find myself missing features of it when working with other languages. Phoenix is well structured for projects and the newer generators solve a lot of common issues/features in projects like user auth in a reasonable way.
Depending on the needs of the app I'd look into deploying to Fly.io otherwise I've been using Kubernetes with little issue. I've toyed with Nomad for orchestration but haven't used it enough to give an opinion. I do wander if it's a nice middle ground for those who don't need the full suite of what K8s offers.
- davehcker 4y agoI second this. I would say that I am pretty advanced with Python (and Django) and same with JavaScript (Vue and Nuxt) and have written applications that got used by multiple users. I saw a sharp rise in my productivity when I knew enough about the frameworks. But Elixir + PhoenixLiveView + Tailwind has been life changing. I learned Elixir for the sake of the joy of learning a new programming language and I kept playing with it for few random days over 5-6 months. Finally, I took the leap of faith and for our startup I started the switch to Elixir + LiveView with minimal JavaScript hooks and I feel a weird bliss that we are two engineer FTEs and I can add features on a daily basis. Why that's the case, I still haven't ruminated myself, but my guess is 1. I have gotten older, 2. Elixir is beautiful and productive by design-- pattern matching, everything is a process (so the dimensionality of time is not an issue at all) and the code is kind of a right balance of simplicity and complexity, and in my opinionated view, there is "one" right way of doing things. 3. Standard tooling (mix, ExUnit). They have enabled us to write really maintainable code and for our next hires, we are willing to pay for them to learn Elixir than switching to other languages. Of course this is only for true for our web app which is actually a weird beast that interfaces farms, sensors, algorithms, and humans.
- kodah 4y agoAwesome experience write up. Question for you and OP, do you find that using languages like Elixir makes it so you have to look for a certain kind of dev given that Elixir is a pretty niche community or are folks with no experience able to adapt with relative ease?
- davehcker 4y agoI didn't want to confess, but yes you're right. Elixir (or the willingness to learn Elixir) is a great filter for me to find the right people. Again, this is my purely subjective opinion and might as well be true for other languages as well.
- nelsonic 4y agoNot one of the OPs but can happily echo their experience/praise for PETAL and think I can answer your dev search question: Anyone with a can-do attitude can learn Elixir. People with a “no thank you, I already know XYZ” mindset you really don’t want on your team. Almost 20 years ago @pg wrote the “Python Paradox” post: www.paulgraham.com/pypar.html The same holds true for Elixir (and Rust) these days. The people you want to hire are those who learn new skills/languages proactively. However I can confidently say, from experience of having hired several Python devs/data scientists with zero Elixir experience, that smart+motivated people can learn Elixir in a couple of days and be productive within a week. See: https://www.verytechnology.com/iot-insights/elixir-for-pythonistas https://www.verytechnology.com/iot-insights/elixir-for-pytho...
- _ktx2 4y agoThat nailed what I wanted to know. Thanks!
- john_the_writer 4y agoI'd argue the other way. Yes anyone with a can-do can learn Elixir. But there's a difference between learn and LEARN.. I work with a pile of rails devs writing code in elixir. In that I mean you can feel the rails in their code. It "tastes" like rails. A few python devs also write python with elixir syntax. Finding people who know the language is hard. Finding people who are willing to risk their time on the language is also hard. By risk. If I spend 2 years writing Elixir and then go looking for a job I'm looking at getting a job with a language that's not popular. So my pool of place that will even look at me is smaller. Hiring managers/gate keepers might not see.. After 12 years of c++ I got a job where I needed to code in Delphi-Script for a year. When I told recruiters what I'd been doing I got "Oh.... Okay um... We'll call you." I switched to rails for 6 months (same job) and recruiters were calling me non-stop. Working in low popularity langs limits my options. (even if they are great langs) I'd say picking a language that's not yet popular limits your pool not just to the can-do's, but also to the can get my next job with this on my CV.
- rozap 4y agoI also went this route, but am keeping the infrastructure simple in order to minimize lock in. It has been super productive but also I've spent years using elixir professionally and unprofessionally so I'm comfortable with it. The nice thing is that the elixir ecosystem is so robust you don't need to get locked into whatever cloud provider solution is in vogue at the moment. Also, we got a pile of cloud credits from different providers, and intend to use them :)
- scwoodal 4y agoI also would choose Elixir/Phoenix. Having spent my career in Python/Django, Elixir/Phoenix/Live View is on another level of productivity. For anyone needing a reason to jump into Elixir, take 40 minutes and watch this talk [1] by Sasa Juric. He communicates things so well as to all the benefits of Elixir/Erlang/BEAM. Then take the time to read Elixir in Action book (again, Sasa) and you'll be off to the races. [1] https://www.youtube.com/watch?v=JvBT4XBdoUE https://www.youtube.com/watch?v=JvBT4XBdoUE
- arnonejoe 4y agoI'll second this. Alpine.js is so nice.
- afhammad 4y agoAdding my vote here. Throughout my career I've gone the C#.NET -> RoR -> Clojure -> Elixir/Phoenix route. After spending a year with Elixir, iterating rapidly on a production system, I'd default to it for any MVP or serious project going forward. LiveView is also very close to becoming default over React for interactive Frontends.
- bratsche 4y agoI feel similarly, except for the AlpineJS part. I think PETL is fantastic and I would 100% choose that for my stack.
- deleted 4y ago[deleted]
- innocentoldguy 4y agoI too would reach for the PETAL stack you mentioned. I don't code professionally anymore, but when I did I had experience using a lot of different languages (e.g., C#, Java, PHP, Ruby, Elm, Python, Perl, Lisp, Node, Clojure, F#, etc.). Elixir is by far the most productive and joyful language I've ever experienced. It's absolutely beautiful.
- Haegin 4y agoWe use Nomad at $JOB and it's been great. We're a small startup with one senior site reliability engineer doing pretty much all the infra work and I (~CTO) chip in when I can be useful, though when we adopted Nomad it was just me working on infra. I looked into Kubernetes (I haven't worked with it at all before) and there just seemed so much complexity to handle things I didn't need that it was too much to learn for the benefit. Once I found Nomad it was a lot simpler, but it has everything we need and that's stayed true as we've grown. I'd definitely strongly recommend it if you're wanting an orchestration system and don't need the complexity Kubernetes brings.
- mxgrn 4y agoFor deployment I'm using Docker + Github CI + Digital Ocean basic droplets. Docker support is built into Phoenix, all you need is `mix phx.gen.release --docker`. What I like about it is that upgrading a DO host is basically a matter of spinning off a new droplet and install Docker on it. Also, setting up deployment for a new Phoenix project takes about 30 minutes now.
- Abishek_Muthian 4y agoIs Liveview CSP compatible? I found out that Alpine isn't and the alternate CSP build of it isn't stable.
- gianpaj 4y agoFly.io is great!