← BACK TO ENGLISH

Learning Phoenix from Programming Phoenix 1.0 with 1.3 - What to do untill the new book comes out?

Date: 07 November 2017 | Updated: 07 November 2017

07 November 2017 | 5 min read

// = Learning Phoenix from Programming Phoenix 1.0 with 1.3 - What to do untill the new book comes out? :id: 5693e9dc-fe39-436c-b960-8f0b078ef8a8 :author: Andrei Clinciu :website: https://andreiclinciu.net/ :publish_at: 2017-11-07 16:15:00Z :heading_image: \N :description: \N :type: article :tags: :keywords: :toc: left :imagesdir: ../assets/

image::{heading_image}[] This blog post might be usefull for people learning Phoenix 1.3 with the Programming Phoenix book. + There are many changes from the older phoenix version for which this book has been written and the yet not published newer book “Programming Phoenix 1.3” which should be here untill 2018.

Many changes have been implemented in Ecto, Elixir and also Phoenix so often I needed to go deep into the source and API documentation (which is useful because the learning curve is better).

If you also followed this, I recommend always searching on the following page if you have issues

https://pragprog.com/titles/phoenix/errata

The Models folder and the web folder have disappeared. The models folder can be replaced by creating folders and storing data for your “schemas”, “models” elswhere . + The web has become _webNOTE: + Ecto validate_length does NOT verify if something is required, so it;s always best to do something like the following by including validate_required

…. struct|> cast(params, [:name, :username])|> validate_required([:name, :username])|> validate_length(:username, min: 3 ,max: 20) ….

 

 

This list of outdated examples might also help.

https://harfangk.github.io/2016/10/10/programming-phoenix-example-code-issues.html

 

I intend to update this post once I restart reading the book alongside the official documentation for 1.3 so I get a better grasp on everything


Need something like this?

I build high-performance Go-based software and websites which I can host for you on a $5 Linux VPS. No intermediate agency layers, direct developer execution.

Discuss an Integration →

Andrei PrivacyZen Newsletter

Liked the article? join Andrei's PrivacyZen Newsletter. Topics include wellbeing, privacy, life, programming, and cybersecurity.