By day I’m a Ruby dev, I’ve taken a few days off work to work through all the stacked up Elixir books I have and I’m really just hoping to deep dive into Elixir and to knock out an application. I’ve been working through the Programming Phoenix book and I’m wondering if the code quality is what you’d expect in your average Phoenix project rather than a play project like the one you build in here.
I’m seconds guessing if the code is dumbed down for new users and overly explicit. If the Context(s) are too much, I’ve got so many files open and getting muddled just trying to work on with a single controller. There are lots of different ways to say authenticate a user on a controller, and it’s really interesting to see but am I getting more options than I need?
There’s a case where the select options for a Category select tag are loaded in a plug defined in a controller, and then the options are extracted in a Context, rather say in a View which seems more appropriate?! Or is the view avoiding touching the database at all.
Then when it comes to testing a controller, the examples seem way too much. e.g. VideoControllerTest where every action is tested to suggest that the user should be logged out. I get it a bad actor could try every route. But is this just for completeness and to prove what you can do?
To some degree I’m expecting to find all the familiarity and equivalents that I use with Rails in just one book, which is probably insane. So far I’m creating objects with basic scaffolds and I’m reaching for the equivalent of nested attributes already because I know my interface isn’t going to be quite so simplified.
Anyway…I’m not really sure what my point is. Is this book a good book to build a project alongside or just to fire out the possibilities and off you go to kill a bear in the woods with your new weapons?
RobL






















