4 ms·
You're right -- there is a conceptual/complexity cost to BEAM applications, distribution, concurrency, supervision trees, etc. I think the idea is that if you
by methehack 10y ago
You're right -- there is a conceptual/complexity cost to BEAM applications, distribution, concurrency, supervision trees, etc.
I think the idea is that if you start with phoenix you don't have pay that cost unless you need it. If you end up needing to scale, the features are there. I think Uncle Bob said once that "architecture is the art of delaying decisions". Phoenix / Elixir let you do this.
Another part of the story is channels. If you're doing websocket work, you can't find a better platform than phoenix / elixir.
Once you start digging in, you realize phoenix / elixir are awesome even if you're not using all the concurrency / distribution stuff. The functional nature / immutability posture of elixir helps you with a large code base and/or lots of devs. There are other features -- pattern matching and macros come to mind -- that make Elixir a great place to code.
All that said, if you have a client, say, with modest needs that is never going to have much traffic, all that might not be worth going with something you're not familiar with. Similarly, if you're talking about a 1-2 dev project, it might not worth learning something new. In those cases, maybe it's rails or django or whatever ftw.
- rpazyaquian 10y agoI am a huge fan of Elixir and Phoenix even without OTP, don't get me wrong. It's my go-to framework now, replacing Rails. I just ended up hitting the OTP chapters in Programming Elixir and Programming Phoenix, and just kind of wondered why I was doing what I was doing, and why anyone would ever have or want to do this. That's been covered pretty well by other commenters, but it seems like it's something you have to experience yourself in order to really understand.
- ams6110 10y agoWhat's the advantage of Elixr/Phoenix over straight Erlang and something like Nitrogen or N2O? I understand that some people (especially those with a Ruby/Rails background) find Elixr/Phoenix more familiar. But is there more going on here than syntactic sugar? If it's ultimately a BEAM application, I'm guessing that Elixr can't do anything that you can't do in Erlang, is that wrong?
- Tenhundfeld 10y agoAt some point, all programming languages are syntactic sugar over assembly. :) But I hear what you're asking. I'm not really familiar enough to answer, but I've seen plenty of articles that say it's more than just a familiar syntax, e.g., http://devintorr.es/blog/2013/06/11/elixir-its-not-about-syntax/ http://devintorr.es/blog/2013/06/11/elixir-its-not-about-syn...
- biokoda 10y agoNitrogen and N2O really aren't that good as frameworks. Phoenix builds and improves on years of web framework iterations from Rails. They did a lot of things right there, but they are hampered by the limitations of the Ruby language. Elixir is Erlang but nicer. While erlang is awesome (I write it every day), it's still a bit of a clunky language that could be much more elegant.