From Ruby/Rails -> Phoenix: learn Elixir first, or dive into Phoenix tutorials?

Hi All.

I have experience with multiple languages and experience with Rails framework, but I don’t yet know anything about Elixir.

If my immediate need is to build a new webapp, and I intend to try with Phoenix (given its positive reviews), is it important for me to first learn Elixir? Or is it easy enough to pickup along the way with Phoenix tutorials?

Thanks in advance!

3 Likes

Do learn Elixir first. It is not Ruby, nor object oriented language.

The Phoenix framework will be easier to pick up once you know Elixir idioms. Iti s also very similar to Ruby. But you will use it better way if you know how Elixir and OTP, umbrella apps work etc.

Edit: also, I found a good way is to build a simple API first to get a feeling of the language/tools, rather than starting with a big project.

4 Likes

I did in this order.

  1. http://elixirschool.com
  2. https://learnxinyminutes.com/docs/elixir/
  3. http://www.phoenixframework.org/docs
6 Likes

Please learn Elixir first. Phoenix is not Rails—it’s just a web server with some conveniences. To really take advantage of it, learn the language first and then some OTP.

Do you really need to build a web app now? A week or half a week or learning Elixir will pay off.

2 Likes

agree with all the others.

I would recommend going through the elixirkoans.io, after you have read up on elixir at elixirschool etc. - gets you through a lot of the syntax.

3 Likes

Fair enough. I have some functional experience with Clojure, so hopefully I can ramp up on Elixir in a week or less. Unfortunately I do have a time sensitive project to do now, and I’m really wanting to not fall back into the old pattern of just using the tools I know (but wish to break free from :wink: ).

Thanks for the suggestions!

3 Likes

We’re very lucky to have some really well written books so definitely check them out :023:

Also don’t forget you can get 25% off both Programming Elixir and Programming Phoenix via your control panel on our competition sites (we are giving away a copy of each per month).

As many have pointed out, Elixir and Phoenix while may look familiar if you know Ruby and Rails, but under the hood they are quite different :003:

2 Likes

Oh if you have good Clojure experience then although the syntax here is significantly different you will pick up the idioms very quickly. You might even be able to start with phoenix and elixir concurrently without much issue. :slight_smile:

Just keep in mind, Phoenix is mostly just a set of plugs, nothing is magical, feel free to look in its source code to see how anything is done. :slight_smile:

1 Like

Sorry, I’m not clear how to exercise the discount on pragprog.com. I’m new here, so I don’t know what the competition sites are…

1 Like

Here ya go :023:

4 Likes

Here’s a really good example of why knowing the language well pays off:

See the first answer.

3 Likes

Super, thanks! Got my books and my discount :slight_smile:

1 Like

Nice one :023:

You can actually use that discount on any Pragprog-published ebook :003:

Please keep us updated on your Elixir journey, and welcome to the community :slight_smile:

Here are a couple threads that you might want to jump in to…

2 Likes

As many smarter people than me wrote before: it’s good to learn some Elixir basics and assumptions.
Phoenix is similar to Ruby on Rails only at the first look - the more you learn it, the more differences you see.

RoR is all about magic and OOP. Phoenix and Elixir - all about functional programming and being explicit.
I can advise you for the beginning “Programming Elixir” - it’s really a great book. Dave Thomas wrote that before starting to code, you have to reset your mind :slight_smile:

2 Likes

Is there book, where it shows many use cases of genStage with Phoenix. For example using it in queues, or with Ecto etc.?

2 Likes

Even aside from the specific case of Elixir and Phoenix (or for that matter Ruby and Rails), learn the language first. That will help you at least realize more easily when/were/how you’ve made some simple typo (or mis-paste or whatever) while copying exercises from the framework tutorial.

3 Likes

Sorry only just noticed your post.

The only Phoenix book I know of at the moment is Programming Phoenix - however I have not read it myself yet. You can see it’s table of contents here: https://pragprog.com/book/phoenix/programming-phoenix

If you like, you can always post a thread asking about resources for learning GenStage with Phoenix :slight_smile:

2 Likes