I know this has been a subject that has gotten some time on the Slack channel (and probably IRC, though I don’t use IRC these days) as well as a HN thread or 2… but here goes:
If you are new to Elixir, do you think it’s better to learn the language THEN Phoenix (assuming you are interested in web applications, that is) or is learning the language THROUGH Phoenix a good approach?
I believe that to learn a language, you need to have a project/task/problem to apply your learning to. Just learning syntax is too abstract to be practical. On the other hand, learning a language through a framework, no matter how “core” it is to the community, seems like a good way to learn the framework (Phoenix in this case) and perhaps not the language itself.
again, I am sure this type of topic has been discussed a lot before in other language communities but I am pretty interested in how people feel about it in the Elixir community.
The language first imo
When I started learning Rails I kept asking questions in the IRC chat, and Ryan (Bigg) said why don’t you learn Ruby, it is really easy and it will help massively in your understanding. He wasn’t wrong. He recommended The Well Grounded Rubyist which is now one of my favourite Ruby books!
Having said that, and although I haven’t looked into Phoenix too much yet (as I want to learn Elixir first) I have noticed that they seem to be taking a different approach to Rails in that there is less magic/DSL - this is a smart move because the things you learn while learning Phoenix will be just Elixir.
Right now though, I am sticking to what I know, and that is learn the language first - it really can’t do any harm and the basics of the language shouldn’t be too hard to grasp anyway - the docs on the Elixir Lang site are actually really good.
Really interested to hear what others thing about this.
I’ve started with “Programming Elixir” and then moved to “Programming Phoenix”.
I would recommend starting with Elixir’s “Getting Started” as it’s enough to move into Phoenix and Phoenix is a lot of fun! After building a real thing with Phoenix it would be easier to apply knowledge from “Programming Elixir”.
On the other side I remember problem of distinguishing Rails from Ruby, when was learning Rails first.
amen to this… I am all for frameworks facilitating efficiency but have a lot of concerns about frameworks that are black box magic, which I understand Rails to be (but again, have no direct opinion on due to my never using Rails). When I was doing PHP, I much preferred “micro frameworks” that helped with routing and session state over Rails-like frameworks like Laravel. Mileage may vary.
I think Phoenix really is just Elixir. It’s a bunch of really useful Modules, Macros, Functions… It’s a Library written in Elixir. I don’t think you could understand Phoenix without understanding Elixir. Phoenix does bring loads of new things to learn, like Ecto, Plugs, Channels etc. But they are ultimately just functions written in Elixir.
That’s true but until I read about pipes from a pure Elixir book, a lot of the Phoenix code looked like magic, then suddenly the code made sense.
I’m still very new to both Elixir and Phoenix, so keep that in mind, but I’d also suggest Elixir first.
Also, I have very much enjoyed working my way through the Programming Elixir book.