Programming Phoenix LiveView: Design, State and Interactive Pages

The book’s authors discuss the framework with Steven Nunez.

SDSophie DeBenedettoGastBTBruce TateGast
Kanal
GOTO Conferences
Veröffentlicht
21. Dez. 2023
Video
42:48
Lesezeit
3 Min.
Original
Englisch
Auf YouTube öffnen
Beim Scrollen schrumpft das Video in die rechte untere Ecke und läuft weiter. Untertitel folgen Ihrer Lesesprache.
LesespracheIn 2 Sprachen verfügbar
Diesen Artikel gibt es noch nicht auf Deutsch, daher wird das Original (Englisch) angezeigt.
ZUSAMMENFASSUNG

In 30 Sekunden

Sophie DeBenedetto and Bruce Tate explain LiveView’s server-side interaction model, practical concerns and design patterns. They discuss code generation, framework evolution and the game and dashboard used in their book.

  1. 1Server-side interactionLiveView keeps much interactive state and logic on the server.
  2. 2Events and differencesEvents update state and send rendered differences to the browser.
  3. 3Search and integrationInitial HTML and optional JavaScript address different application needs.
  4. 4Large collectionsStreams help manage large collections without retaining all items in server state.
  5. 5Application designTestable transformations and layers support maintainable design.
  6. 6Generated codeGenerated code is a starting point that can be inspected and changed.
  7. 7Book examplesA game and dashboard demonstrate multiple live interaction patterns.

Das Wichtigste

  1. LiveView keeps much interactive state and logic on the server.
  2. Events update state and send rendered differences to the browser.
  3. Initial HTML and optional JavaScript address different application needs.
  4. Streams help manage large collections without retaining all items in server state.
  5. Testable transformations and layers support maintainable design.
  6. Generated code is a starting point that can be inspected and changed.
  7. A game and dashboard demonstrate multiple live interaction patterns.
VOLLTEXT

Den bearbeiteten Text nach Kapiteln lesen

Nur das Transkript
01

What LiveView does

Processes, connections and interactive pages.

GOTO Book Club host Steven Nunez interviews Sophie DeBenedetto and Bruce Tate, co-authors of Programming Phoenix LiveView. The discussion reflects the framework and book as of 2023; the authors also have a commercial interest in the book and training.

Tate describes teaching Elixir developers and his publishing work. DeBenedetto introduces her software and writing background, and the group notes their shared involvement in the BEAM Radio podcast.

Nunez asks what LiveView is and what problems it solves. DeBenedetto describes building interactive web interfaces while keeping much of the application state and logic on the server.

She connects the approach to Elixir and the BEAM’s process model: a live view has a process that receives messages and updates state. The framework provides infrastructure around those processes, although application design and operations still matter.

LiveView can reduce the amount of custom JavaScript needed for many interactions. The guests also acknowledge that developers can add JavaScript when a particular browser-side interaction or library requires it.

Tate places LiveView in the history of Phoenix and describes the request pipeline. An initial page is returned, then the client establishes a persistent connection for interactive updates.

Events travel from the browser to the server, where application state is updated; rendered differences can then be sent back to the client. This avoids sending an entire new page for each interaction, but latency and connection behavior remain design considerations.

02

Practical concerns

Search, security, recovery and large lists.

Nunez raises search-engine visibility and JavaScript integration. The guests describe an initial HTML response for crawlers and mechanisms for integrating browser-side behavior; the outcome still depends on the application’s content and implementation.

DeBenedetto lists common production concerns including security, lost connections and state recovery. Framework defaults help, but developers still need to understand their application’s authorization and failure modes.

They discuss efficient page differences and handling large collections. DeBenedetto mentions LiveView streams as a way to manage large lists without keeping the full collection in each live view’s server state.

03

Design and generators

Layers, tests and inspectable code.

Nunez asks why a framework book spends so much time on design patterns. Tate says a useful application needs layers around the framework: data, transformations, dependencies and lifecycle management.

The authors describe starting with data and transformations that can be tested, then adding layers for coordination and framework integration. This separation can make changes easier to understand and test.

DeBenedetto contrasts the book with reference documentation. Documentation explains features such as forms and uploads; the book tries to show how the pieces fit into an application’s design.

They highlight Elixir abstractions used by components and forms, including templates and protocols. Those abstractions can remove repetitive work, but developers benefit from understanding what they generate and how they compose.

Nunez asks about Phoenix generators. Generated code is placed in the project where developers can inspect and modify it; the authors use it to teach conventions and provide a starting point rather than treating it as untouchable magic.

DeBenedetto says generators handle repetitive setup, including wiring pieces of an application together. Generated code still needs to be reviewed and adapted to the application’s requirements.

04

Evolution and examples

Components, developer experience and a game.

The guests look back at LiveView’s rapid evolution during the book’s development. Early adopters had to update examples as APIs and component patterns changed, while improved tooling made common tasks easier.

Tate discusses more readable templates and checks that can catch mistakes. DeBenedetto praises the framework maintainers’ responsiveness to user feedback; those are the authors’ experiences and opinions.

They cite developer-experience improvements such as verified routes and explain why attention to ergonomics matters for people maintaining an application over time.

The book uses a game and an interactive dashboard instead of only a chat example. The authors chose them to exercise state, concurrency and live updates in more than one kind of application.

In closing, the authors say they want readers to understand not just individual functions but how to design, build and evolve LiveView applications. They point listeners toward the book and their community work.

Mehr aus diesem Kanal

3 Folien39:12EN
GOTO Conferences· 28. Okt. 2026Cate Huston: How Rigour Supports AI-Assisted Development VelocityCate Huston · TwillA two-person team’s experience with release gates, automated checks, prioritization and the cost of shipping faster.KI-Engineering-FührungSoftware engineeringAI agents
4 Folien22:33EN
GOTO Conferences· 26. Okt. 2026William Schor: From Unit Tests to Synthetic Canaries at NetflixWilliam Schor · NetflixHow generated workloads and production-like infrastructure help test a distributed key-value service.Software engineering
5 Folien34:11EN
GOTO Conferences· 23. Okt. 2026Anatoliy Bilenko and Alberto Carretero: Making Database Protocols Reliable with Formal Methods and AIAnatoliy Bilenko, Alberto Carretero · CanonicalCanonical’s database engineers connect executable specifications, model-based tests, failure exploration, and reconstructed execution histories—and explain why none of these techniques proves a real system correct on its own.Entwicklungs-Workflows & TestsCode review & verificationObservability & Zuverlässigkeit+2
28:15EN
GOTO Conferences· 22. Okt. 2026Steve Poole on Open-Source Security and AI’s Maintenance ChallengeOlimpiu Pop, Steve PooleWhy faster vulnerability discovery increases pressure on maintainers, dependency users and upgrade processes.Software engineeringAI security
5 Folien46:36EN
GOTO Conferences· 21. Okt. 2026Don Syme: Building Agentic Automation Around Human CollaborationDon Syme · GitHubContinuous AI, repository workflows and the guardrails needed for unattended software maintenance.Agent orchestrationSoftware engineeringCoding-Agenten
28:23EN
GOTO Conferences· 19. Okt. 2026Learning Ash: Declarative Elixir Apps, Testing and ExtensibilityChristian Alexander, Rebecca Le, Zach DanielRebecca Le and Zach Daniel explain how their book and the framework evolved together.Software engineering