July 1st, 2024

HTML-ivating your Django web app with Htmx, AlpineJS, and streaming HTML

The video discusses concerns over the prevalence of single page applications online, promoting traditional server-based websites. It recommends Django over React, demonstrating fast website creation and speed optimization techniques.

Read original articleLink Icon
HTML-ivating your Django web app with Htmx, AlpineJS, and streaming HTML

The YouTube video delves into the widespread adoption of single page applications (SPAs) on the internet, highlighting worries about their excessive use and intricacy. It emphasizes the advantages of conventional server-based websites and explores alternative strategies in web development. The video suggests considering Django over React and showcases instances of developers achieving rapid website creation using Django and Python. Furthermore, it showcases a real-life example where a company enhanced website speed by establishing limits for HTML, CSS, and JavaScript resources.

Related

The demise of the mildly dynamic website (2022)

The demise of the mildly dynamic website (2022)

The evolution of websites from hand-crafted HTML to PHP enabled dynamic web apps with simple deployment. PHP's decline led to static site generators replacing mildly dynamic sites, shifting to JavaScript for features like comments.

Curating my corner of the Internet with a freehand web editor

Curating my corner of the Internet with a freehand web editor

The article reflects on the decline of personal websites in favor of commercial platforms, advocating for unique web design. It discusses limitations of current tools and introduces Hotglue as a freehand web editor promoting creativity and individuality.

Self and Self: Whys and Wherefores (2009) [video]

Self and Self: Whys and Wherefores (2009) [video]

The YouTube video discusses career and idea management, prioritization, Simula creation, structured programming, leadership in development, values in design, and efficient garbage collection. It mentions optimizing a Small Talk system in graduate studies.

An Htmx Success Story

An Htmx Success Story

Discussion on transitioning from Django+React to Django+HTMX stack. Challenges with Django and React highlighted, solved with HTMX and AlpineJS. Improved simplicity, productivity, and compatibility with older devices. Transition driven by developer productivity.

New Web Development: Or, why Copilots and chatbots are bad for modern web dev

New Web Development: Or, why Copilots and chatbots are bad for modern web dev

The analysis critiques Copilots, chatbots, and React for web development, citing slow sites, complex code, and high costs. It advocates for a shift to browser APIs, CSS, and HTML for better performance and lower expenses. Transition challenges include finding developers skilled in vanilla JavaScript. Organizations are urged to prioritize simplicity, efficiency, and core web technology training.

Link Icon 6 comments
By @extr - 4 months
Interesting talk. I've been looking into this stack recently as a backend/ML developer who wants to start building web apps but doesn't want to dive deep into the NextJS/React ecosystem. So far it's going well, I'm definitely avoiding all of the previous stumbling blocks around setting up a JS/TS environment, not knowing NextJS best practices, etc. The learning curve there in the past was painful.

However, now that I'm getting to the point where I want to take my web app from "pretty cool toy" to something I can sell to users with all the bells and whistles, I'm having a bit more trouble. There just aren't as many examples out there for "bell and whistle" patterns than there are with React.

Eg: I want to implement typeahead. When I google "typeahead htmx alpine" I get some blog posts, some reddit posts, some random github gists. Cool, but looks like I'm going to have to think about the problem and toy around with it a bit to get it working. It's not quite "copy and paste this component". When I google "typeahead react" the 1st link is a pretty popular npm package that seems to support everything I want (and some stuff I didn't even know I wanted). Complete with user guides and docs and everything.

So now I'm asking myself whether I made the right decision trying to keep things "simple" with htmx/alpine? It's not even about whether my app is a SPA or not, or "how much interactivity I want" (which is a difficult question actually if you're not familiar with FE - what is interactivity, exactly?), it's more like "which framework is easier to blindly stumble through (with ChatGPT's help) to get what I want".

By @delbronski - 4 months
Htmx has been great. I reach for it in a lot on my projects. Although I have to admit that for my larger Django projects it gets a bit difficult to work with. Creating a url then a template then a view every time I need my page to change gets a bit repetitive and difficult to work with.

Alpine.js has never really clicked for me. Outside of anything simple I find myself struggling with the framework.

By @brunoqc - 4 months
Similar to this, anyone knows how to use htmx within a shadowrootmode to stream html out-of-order? I asked here https://github.com/bigskysoftware/htmx/discussions/2646
By @milliams - 4 months
The other talk mentioned in this one ("Back to the Future of Hypermedia in Django") is at https://www.youtube.com/watch?v=J0xES5wGjik
By @stuckinhell - 4 months
It seems interesting, but for complex ui's it's seems almost nitemarish