Phoenix for Rails Developers – Part 3

I have now completed the book (although not all of the bonus exercises).

The remainder of the book demonstrated extensions to the application to create an administration mode. This shows how you extend an existing application.

Overall the book is a gentle introduction to Phoenix and avoids introducing some of the more complex features (there is no attempt to explain OTP or Channels).

The code struct has been easy to follow with the examples being split into the correct sized chunks. This is in comparison to Learn React Native who code samples were excessive given that you needed to type in several pages of code before anything could be checked.

I did find a few typos which the author says are due to be corrected soon (an early view of the contents of the database includes the admin flag, some brackets are missing on some of the redirects and the validate_max_price method breaks when the price is null).

This has been a very useful addition to my Elixir/Phoenix study library.

It is interesting to compare the changes in the Phoenix framework between the Learning Phoenix book and this one. The major difference is the movement of the model from within the Phoenix app itself (storex_web) into a library (storex).

The only variation I took from the book was to add Credo:

{:credo, “~> 0.9.0”}
This is a style and code recommendation tool that use gets suggested in a number of places.
This adds a number of styling warnings for any application. It can be customised but does encourage good practice.
I have fixed up some of the hints (spacing issues, don’t use cond with only one non-true condition).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s