Build a real-time Twitter clone in 15 minutes with LiveView and Phoenix 1.5

Channel:Chris McCord · Length:17:55 · Published:2020-04-22 · Views:237626

Watch on YouTube

Summary

Phoenix creator Chris McCord builds a real-time Twitter-style app live with Phoenix LiveView 1.5 in about 15 minutes. It shows interactive, real-time updates without writing JavaScript.

Why HN recommends it

HN points people to it as the demo that shows why LiveView and Elixir are worth a look.

the demo completely blew my mind — HN, 2020

Functional programming · Web development

Subtitles (excerpt)

hey it's Chris McCord and today we're going to write a Twitter timeline clone from scratch using Phoenix live view my goal is to show you just how great LabVIEW is at building interactive applications we're not going after write any JavaScript to make it happen and the amount of data that we write on the wire at the end is going to be more efficient than the best single page app you could write by hand if that sounds crazy or you're skeptical stick with me it's going to go fast but I promise at the end that I think I'll have you convinced okay so to get started we can run the mix Phoenix new command so we'll say mix Phoenix new chirp and we can pass - live to get the live you dependencies and we'll say yes since all our dependencies okay let's see the into a directory and open a new editor alright they get started Phoenix includes a PHX gen live command and this bootstraps a crud live view which lets us just hit the ground running so to build our Twitter Timeline feature let's build a timeline and the resource that we want to persist is a post and the plural form that's going to be the database table so we'll call it posts the fields should be let's say push up a username a body and let's say a

On Hacker News

My favorite talk is the Live View twitter demo on my case: [VIDEO] . Never before I've been so bluffed by a new technology, he's building a small twitter clone in 20min with live reload, browser sync and everything, this would take days with any other traditional tech I know. — realusername, 2020-12
I think the "talk" by Chris McCord should apply here "Build a real-time Twitter clone in 15 minutes with LiveView and Phoenix 1.5", while not really a talk this year was special and the demo completely blew my mind. it's available here: [VIDEO] — staticelf, 2020-12
> But I'm wondering if it brings enough other advantages that I shouldn't view it that simplistically. So to start with, Phoenix LiveView really is a game changer, you should have a look at Elixir just for that. This is the talk which really bluffed me when I first saw it: [VIDEO] . For the other upsides, I like a little bit better the way everything is architectured in Phoenix, there's much less… — realusername, 2020-12
Liveview solves the "write a fully dynamic and interactive application with next to zero Javascript that you need to write by hand" or, if you will, "server-driven UI apps". And it's hard to overstate, but to also properly explain, how important this is and how it feels like magic when you do it. Because it lets you tap into everything Elixr (and Erlang VM) have to offer on the backend without ev… — dmitriid, 2023-03
Yes and no. The real answer (with an Erlang bias) is to look at Elixir + Phoenix + LiveView. Here's a neat demo. No JavaScript required. [VIDEO] — frellus, 2021-08

Related videos