Programming Phoenix LiveView 9781680508215

If you haven’t been following closely, it might seem like LiveView came suddenly, like a new seedling that breaks throug

965 196 9MB

English Pages 412 Year 2023

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Programming Phoenix LiveView
About the Pragmatic Bookshelf
Table of Contents
Change History
B9.0 March 21, 2023
B8.0 October 14th, 2022
B7.0 March 30th, 2022
B6.0 Jan 28th, 2022
B5.0 July 1st, 2021
B4.0 April 29th, 2021
B3.0 April 2nd, 2021
B2.0 March 11th, 2021
B1.0: February 24, 2021
Introduction
Is This Book for You?
About this Book
Online Resources
Chapter 1: Get To Know LiveView
Single-Page Apps are Distributed Systems
LiveView Makes SPAs Easy
Program LiveView Like a Professional
Install Elixir, Postgres, Phoenix, and LiveView
Create a Phoenix Project
The LiveView Lifecycle
Build a Simple LiveView
LiveView Transfers Data Efficiently
Your Turn
Part 1: Code Generation
Chapter 2: Phoenix and Authentication
CRC: Constructors, Reducers, and Converters
Phoenix is One Giant Function
Generate The Authentication Layer
Explore Accounts from IEx
Protect Routes with Plugs
Authenticate The Live View
Access Session Data in The Live View
Your Turn
Chapter 3: Generators: Contexts and Schemas
Get to Know the Phoenix Live Generator
Run the Phoenix Live Generator
Understand The Generated Core
Understand The Generated Boundary
Boundary, Core, or Script?
Your Turn
Chapter 4: Generators: Live Views and Templates
Application Inventory
Mount and Render the Product Index
Use Components to Render HTML
Handle Change for the Product Edit
Manage Change with a Form Component
Your Turn
Part 2: LiveView Composition
Chapter 5: Forms and Changesets
Model Change with Changesets
Model Change with Schemaless Changesets
Use Schemaless Changesets in LiveView
LiveView Form Bindings
Live Uploads
Your Turn
Chapter 6: Function Components
The Survey
Organize Your LiveView with Components
Build The Survey C ontext
Organize The Application Core and Boundary
Build The Survey Live View
Build a Simple Function Component
Build the Demographic Show Function Component
Your Turn
Chapter 7: Live Components
Build the Live Demographic Form Component
Manage Component State
Build The Ratings Components
List Ratings
Show a Rating
Show the Rating Form
Your Turn
Part 3: Extend LiveView
Chapter 8: Build an Interactive Dashboard
The Plan
Define The Admin.Dashboar dLive LiveView
Represent Dashboard Concepts with Components
Fetch Survey Results Data
Initialize the Admin.Surv eyResultsLive Component State
Render SVG Charts with Contex
Add Filters to Make Charts Interactive
Refactor Chart Code with Macros
Your Turn
Chapter 9: Build a Distributed Dashboard
LiveView and Phoenix Messaging Tools
Track Real-Time Survey Results with PubSub
Track Real-Time User Activity with Presence
Display User Tracking
Your Turn
Chapter 10: Test Your Live Views
What Makes CRC Code Testable?
Unit Test Test Survey Results State
Integration Test LiveView Interactions
Verify Distributed Realtime Updates
Your Turn
Part 4: Graphics and Custom Code Organization
Chapter 11: Build the Game Core
The Plan
Represent a Shape With Points
Group Points Together in Shapes
Track and Place a Pentomino
Track a Game in a Board
Your Turn
Chapter 12: Render Graphics With SVG
Plan the Presentation Layer
Define a Skinny GameLive View
Render Points with SVG
Compose With Components
Put It All Together
Your Turn
Chapter 13: Establish Boundaries and APIs
It’s Alive: Plan User Interactions
Process User Interactions in the Core
Build a Game Boundary Layer
Extend the Game Live View
Add Help with JavaScript
Build a Picker to Control Navigation
Your Turn
Bibliography

Programming Phoenix LiveView
 9781680508215

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers