How would you recommend learning Phoenix today?

With the Phoenix book not due to be updated to cover 1.3 until the end of year how would you currently recommend learning Phoenix?

…or?

Would love to hear your opinions or what you may have done.

4 Likes

I’m reading the book but on a Rumbl phoenix project generated with version 1.3. I ended up with a User MVC looking more like a 1.1 version, mixed with Video and Category generated and using contexts. I the begining I thought I would get to a road block with that weird mix, but it worked fine (just completed part I).

Of course it’s not always straightforward, but I found it to be a very good way to understand changes introduced by 1.3. It’s also a better learning experience as I’ll face problems and have to go deep in the code and dependencies to fix them.

I’ve purchased Functional Web Dev with Elixir OTP & Phoenix but have not started reading it, might be the next one, also I’ll probably just dive into programming a real world app before I have time to start read it.

2 Likes

Functional Web Development with Elixir, OTP, and Phoenix, sadly, doesn’t use Ecto.

2 Likes

@AstonJ just pick up a small project and start dabbling.Programing Phoenix is very good…the guides are quite informative.I am still using 1.2.

4 Likes

I am currently going through Phoenix Inside Out by @shankardevy, it gets just into enough details to remove the too much abstraction that may be. For example, before reading it I never understood why we have both template and view directories, he goes in and explains how Phoenix creates a function for us (you get to create that function and see that it really works as expected

Second great thing I love about it, it introduces testing with Phoenix - this is awesome especially now that I have first-hand experience as to why writing tests is important

I havent finished going through it yet but I would recomment you have a look at it

He actually has a post about it on elixir forum

3 Likes

I am currently reading Mastering Phoenix Framework by @shankardevy.

It is excellent for someone porting from Rails, so far the best on boarding pathway. Shankar explains not only HOW something works, but WHY it works and WHY it is laid out that way.

For example I was puzzled to see a VIEWS and TEMPLATES folder, but then Shankar’s book explains Phoenix compiles the template and makes it available as a function n the views folder. Very helpful insight.

Also the breakdown of Elixir lang basics is very helpful, productive and pragmatic as it focuses on what you would be using 99% of the time without distracting you with a lot of other noise.

In doing so he lays out a great yet simple path to be productive in the shortest amount of time. So far this is the best book I have found for someone new to Phoenix from any language.

The author explains the value of being explicit in Phoenix vs implicit, the code involved is not much more and I immediately recognized the value of being explicit.

Based on how the author shares these insights, to me it seems Phoenix is that unique sweet spot between Rails (a framework) and Sinatra (a micro service you wire up with libraries), yet is still elegant as the Elixir language is elegant.

Phoenix and functional programming may initially look inaccessible to an OO programmer but this books makes both very accessible. If one just follows the path laid out, its virtually a straight line path to getting things done vs losing time experimenting and getting disillusioned.

The author has a nice flow chart that shows the path of many beginners with Phoenix. Its quite humorous and clear the author has gone down all these paths and is sharing his wisdom to avoid such traps.

I want to thank Shankar for his service to the Elixir and Phoenix communities, he has created a gem of a solution for much easier adoption of Phoenix and functional programming.

I have read other books, but so far this is by far the best for being most up to date, pragmatic and getting you productive in the shortest and straightest path possible. Understanding the WHY of certain patterns behind the framework fosters confidence which is much needed when learning a new stack.

I am only half way through the Mastering Phoenix Book at the moment, but the author also provides one on Ecto, Contexts (to better understand them) and Garuda, where you build your own lighter version of a Phoenix Framework to better understand how all these libraries work together.

All in all, it is a fully comprehensive resource for understanding, becoming productive and avoiding common traps new beginners fall into.

Thank you again to the author for his exhaustive work and sharing humble insights from his own experiences as a beginner.

9 Likes

I agree with Sigu and Pardeep, Phoenix Inside Out is the way to go.

Mastering Phoenix Framework is a masterpiece!

It’s like you’re pair programming with Shankar, building an ecommerce system, the way it is built in a real Agile/XP dev team, with User Stories and BDD/TDD.

2 Likes

(from my review on Quora)

The Phoenix Inside Out Series by Shankar Dhanasekaran

It’s a collection of 4 books, each of which is a treasure trove of tips and tricks to enable beginners (such as myself) to take good decisions while writing web apps in Phoenix.

Mastering Phoenix Framework is the one you want to start out with. He helps the reader build a feature filled e-commerce webapp from scratch in Phoenix 1.3 - complete with admin modules and a chat engine. It felt like the book was written in the spirit of The Rails Tutorial by Micheal Hartl, and for the most part, manages to stay true to it. The language is clear, and easy to understand. The examples were relevant to the project and encouraged a clean, best-practices approach to writing code.

For those following along with the book, there are plenty of byte sized wins along the way - reflected in the progress you make while building your app. It makes up for the lack of a dedicated exercises/problems section at the end of some chapters.

Also provided is a concise introduction to Elixir in the first couple of chapters itself, not to mention the interventions made in later chapters when a new concept is introduced (eg. OTP).

The other books are wonderful in their own right, and I am working through them at my own pace right now. Full disclosure, I have only read the Ecto Cookbook (cheatsheet?) in its entirety, and have skimmed over the other 2 (Garuda and Blueprints for Phoenix Contexts - IMO best left till after one completes the Mastering Phoenix book). The Ecto and Phoenix Contexts cookbooks/recipes are proving to be a handy reference while rolling my own app.

Shankar is someone who loves what he’s doing, and it shows in the amount of love he has put into the book itself. If you are looking for a gentle, current introduction to the Phoenix Framework, this series is a great place to start!

1 Like

Honestly, unless you’re already proficient at Erlang, OTP, and Elixir I wouldn’t even start with Phoenix. Learn OTP first, master it even, what you will find is that you don’t need Phoenix at all.

1 Like

I think you’re missing the point. Phoenix is a great starting point to get into web-related Elixir projects just having learned Elixir. And Phoenix has a solid enough foundation to support significant growth.
Sure, Phoenix isn’t the destination and OTP and Erlang should be on the “to learn and master list” (but being on the web there are also essential frontend topics as well).

Phoenix is partially responsible for the interest in and growth of Elixir. “Just use cowboy and plug” would seem reminiscent of “just build your own server with ring” in Clojure - there the lack of a web framework lead to a crowd funding campaign that eventually lead to the creation of Arachne.

Elixir already has Phoenix - and that is a good thing.

4 Likes

Thats, actually a non-answer, the question is how to learn phoenix, not how can I learn enough about elixir and the beam so that I won’t need it.

1 Like

Haha I’d agree with most others here in that Phoenix is actually a really nice bit of tech to use with Elixir, particularly given how lean it is. Remember that Phoenix isn’t like Rails or other common ‘web frameworks’ - in fact legendary folk like PragDave have gone on record as saying that it’s not a web framework… it’s much more than that :003:

We’ve actually had some really interesting discussions about Phoenix and how it can be used. Did you know for example, that you can have multiple Phoenix layers in your Elixir app? Imagine doing that with some other web framework :lol:

Not sure if you’ve seen it, but I highly recommend Dave’s online course - his thoughts are probably not too dissimilar to yours (he uses Phoenix as a strict web layer, taking the ‘Phoenix is not your application’ to a whole new level).

On top of all that, there’s the reason why we use ‘web frameworks’ to begin with - the conveniences and benefits you get, such as generators, security, a unified way of building apps, best practices baked in, etc.

As James mentioned this is kinda off-topic, so if a big enough discussion ensues we can split it into a dedicated thread :slight_smile:

1 Like

Dave’s course is quite excellent, and I highly recommend it, but it’s an Elixir course with some Phoenix at the end. The guides are okay, and they are a work in progress. I would start with Context Guide because it creates an application architecture that is very modern, and you get to see the finished product without models. The architecture from Dave’s course dovetails nicely with the Context guide.

2 Likes

Will Dave’s online course teach you how to build a Phoenix app right away or will it just help you to understand Elixir better? My goal is to be able to start building a Phoenix app right away, so I would like to know if this course is right for me. Thanks.

1 Like

His course shows you how to build an Elixir app with Phoenix for the web layers. So you build a game, which can be played via the command line as well as via your browser (Phoenix layer one) as well as via a SPA with websocketsc and Vue.js (Phoenix layer two).

Most of the work is in Elixir so it does not teach you the ins and outs of Phoenix.

My plan is to finish the guides early next year, then see what other Phoenix learning material is available before progressing. (To date I have read Programming Elixir, Elixir in Action and done Dave’s course - not regretted any of it!)

3 Likes

Thanks for your reply. I’m curious, did he state why he chose to use Vue.js? I think I’m going to subscribe to Daily Drip to learn how the Firestorm Forum was built.

1 Like

I think he said because it was accessible/easy to get into (and needed something to show off websockets) :slight_smile:

Yeah, definitely check out DailyDrip and Firestorm :023:

1 Like