HTMX + Flask: Modern Python Web Apps, Hold the JavaScript Transcripts
Chapter: Welcome to the course
Lecture: Introduction to the course
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Welcome to htmx and Flask,
0:03
Modern Python web applications hold the JavaScript. If you're building rich interactive web applications,
0:10
you might think you must use lots of JavaScript on the frontend.
0:13
Your choices are not whether or not to use javascript,
0:17
they are: should I use VueJS or React or some other framework that is
0:22
going to come out in six months. In this class,
0:25
we're going to talk about htmx.
0:28
This is a really cool JavaScript library,
0:31
that is basically the last bit of JavaScript that we need for many amazing interactive features
0:37
on our website. So instead of working with these rich JavaScript frameworks like Vue or
0:43
React and then following the conclusion that well,
0:47
if you're doing almost all the work in JavaScript on the front end and you're just
0:52
barely talking to the backend,
0:54
maybe the back end should just be NodeJS or a bunch of static files,
0:57
talking to cloud lambda functions or something like that.
1:01
You know, what we're going to say is let's reverse that.
1:04
Let's put the emphasis back on the server-side where we can write richer code in
1:09
a variety of languages and technologies. In our case,
1:12
of course, Python and Flask.
1:14
And we're going to include htmx in our page, and it will turn on a
1:19
bunch of features, but those features are driven by the server-side. We'll use cool little
1:25
HTML attributes to say this page or this part of the page is driven by this
1:30
thing on the server and htmx takes it from there.
1:33
There's almost no JavaScript to write to get very,
1:36
very similar behaviors, but you can choose any technology that you like.
1:41
We're also going to see some really cool libraries,
1:44
some open source libraries that I created for both Jinja and the Chameleon temple language in
1:49
Python that allow us to create composable, reusable elements of HTML.
1:55
This turns out to be incredibly useful for Python web applications in general,
1:59
but it's extremely helpful for the way htmx works as you'll see.
2:04
So if you've been looking to create interactive dynamic web pages,
2:08
kind of like you would with Vue or React,
2:11
but you really don't want to switch your entire tech stack over to JavaScript,
2:14
you want to keep doing Python with Flask or Django or one of these server-side
2:18
frameworks, but get the same outcome.
2:21
Well, htmx is going to be extremely exciting for you, and I think you're
2:24
gonna love this technology. Let's get into it.