In this video we do a code review of a web application that does dynamic partial page updates - rich interactivity on a web page - without any complex JavaScript frameworks or tooling.
GitHub repo covered in video:
github.com/wiverson/htmx-demo
The secret is combing Thymeleaf Fragments and htmx.org - by just adding a few htmx attributes and return fragments of Thymeleaf HTML, your web application becomes dynamic.
Many common UI patterns are shown, including infinite scroll, instant file uploads, and more. Dynamic websites with Java have never been easier.
Tech covered:
Spring Boot, Maven, Thymeleaf, HTMX, hyperscript, WebJars, npm via WebJars, and much more.
Table of Contents:
01:03 - What is HTMX?
03:31 - GitHub Sample Project
04:30 - Running ToDo sample
06:15 - Maven pom.xml review
07:36 - WebJars to access NPM modules
10:03 - Spring Boot code review
13:26 - Thymeleaf fragments
19:24 - What is hyperscript?
21:53 - Lots of HTMX demos
22:49 - Infinite Scroll demo
23:45 - Handlebars template example
25:04 - Input catalog demo
24 авг 2021