Published Jan 3, 2020

Episode 394: Chris McCord on Phoenix LiveView

Explore the transformative potential of Phoenix LiveView with its creator Chris McCord, as he delves into server-side rendering and state management enhancing real-time web applications' interactivity, performance, and development simplicity while addressing its challenges in offline and latency-sensitive scenarios.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Performance Gains

    Chris McCord, the creator of the Phoenix Framework, highlights the performance benefits of LiveView over traditional single-page applications (SPAs). He explains that LiveView reduces the need for complex JavaScript frameworks, leading to significant performance gains and faster development times. By maintaining a persistent WebSocket connection, LiveView eliminates the overhead of repeated HTTP requests, resulting in a more efficient user experience.

    We authenticate once and now every interaction the user takes is over an existing website websocket connection. So no HTTP overhead, no parsing the session, no authentication.

    ---

    This approach not only speeds up development but also enhances user experience by reducing latency and data payloads 1 2.

       

    Simplified Development

    LiveView simplifies web development by minimizing the need for JavaScript and complex client-server contracts. Chris McCord explains how LiveView removes the necessity for defining intricate client-server interactions, which are typically required in SPAs. This reduction in complexity allows developers to focus on building features without the overhead of managing stateful client-side applications.

    This entire router controller payload contract layer just completely disappears and that vastly simplifies the programming model of building a web app.

    ---

    By eliminating these complexities, LiveView offers a streamlined approach to web development, making it feel almost effortless 3 4.

       

    User Experience

    LiveView enhances user experience by providing real-time updates and interactive features without the need for extensive JavaScript. Chris McCord shares examples of applications that benefit from LiveView's capabilities, such as real-time validation and interactive games. However, he notes that LiveView may not be suitable for applications requiring zero latency, like typing tutors, due to inherent latency in server-rendered interactions.

    If a user expects zero latency interaction at the speed of key press at the browser render event loop, then this is going to be a bad fit for live view.

    ---

    Despite these limitations, LiveView offers a compelling solution for many real-time application needs 5 6.

Related Episodes