Hacker News new | ask | show | jobs
by freehunter 2555 days ago
My preferred way of learning a new language/framework is watching someone walk through creating a real app in that language/framework so I can see all the folders/files I need to touch and the thought process moving step-by-step. Unfortunately I haven't found much in the way of that for Phoenix, the stuff on Udemy is pretty outdated last time I checked. Any recommendations?
4 comments

The way I've learned so far was building my own app while skimming the docs and looking at successful open source projects like https://github.com/thechangelog/changelog.com for inspiration and guidance. Basically error driven development and looking up things as needed. Of course also taking advantage of IRC / Slack / Forums when I get really stuck.

But recently I read the Programming Phoenix 1.4 book (written by the authors of Elixir and Phoenix) and it really filled in a ton of gaps and made so many things click together. I can't speak highly enough about it. In fact, finishing that book today is what provoked me to write my comment here. The book might be exactly what you're looking for as like 5% of the book focuses on the super basics and a toy example, but 95% of the book focuses on building up a pretty real app and layering on features as you go. It's also up to date and feature complete even though the book is labeled as a beta release.

By the time you finish the book, you exercise a ton of interesting things along the way (including how to take advantage of Erlang's VM to build features that would be 100x more effort and probably 10x worse in other tech stacks). You definitely don't just build a simple todo app. I don't even want to say what we build in the end because it feels like a spoiler. I only say that because when I hit the last section of the book I had no idea what was coming and was blown away by what it covers. It literally made me smile for hours just thinking about how badass everything is when it all comes together.

Glowing recommendation, I'll have to check it out!
I concur. Programming Phoenix (I read the old version, 1.2 or 1.3, don't remember) and it is simply so well thought and helps you understand why Phoenix is not as magic as its appears in the start.

I also recommend you to try to play with Plug. Things make much more sense in Phoenix after you understand how Plug works.

That's exactly what I do at https://alchemist.camp. Most the videos and all the intro-level ones are free.

I've also put up about a hundred screencasts at http://youtube.com/alchemistcamp.

Looks like a cool site. I'll check it out. My Elixir is Good. My Phoenix is not.
I’m building a side project in Phoenix right now. For me the learning curve is wondering whether Phoenix has a built-in or “everybody does it this way” solution to the problem I’m facing or whether it’s something I should implement myself.

In Rails the answer is always “use this popular gem” and in Go the answer is always “roll your own”. Phoenix is somewhere in the middle.

The good thing about Phoenix is you are not forced to go in any particular convention for everything, you can craft them yourselves from scratch. The bright side of this is you will only every little thing in the implementation and you'll know how to optimize it.
The one time I really want to override something in a Phoenix app was deleting a response header bolted on by Cowboy (I think it was the server header). I couldn't find a work around, so I did something lame like intercept the formatted response and modify it. Some flexibility in that area would have been nice, but it was a pretty niche corner case on a not too important app, so a time crunch hack was my best option.
I'd say you're in good shape, then. Phoenix is really well-designed and doesn't have a lot of "magic" in it.
https://pragmaticstudio.com/elixir

https://pragmaticstudio.com/courses/unpacked-full-stack-grap...

These have been my go-to that seem to fit what you're describing. I hope this helps.

For event sourcing in Elixir this is a very good walk-through: https://blog.nootch.net/post/event-sourcing-with-elixir/

Another example is: https://github.com/AltTracker/alttracker

It's an implementation of fully functional site. The beauty of Elixir is that the code is very readable.