Is it possible to make server-side rendering on Java less complex? What if we'd done it with just Java 21 (preview) features?
Using Java to drive both backend and web frontend is not in any way a novel idea. But that usually comes with programming models that feel complex and constrain how user, browser and server interact.
This talk introduces two backend agnostic hypermedia libraries that allow for much simpler programming model: Unpoly and HTMX. We can use Unpoly to replace full-page re-renders with partial updates and branching off to layers or modal interactions while server renders full-page views. Or we can use HTMX to drive fragment updates on page while server renders snippets of HTML to update.
In order not to get distracted with java frameworks, our template engine will be Java 21 String templates and our server the one shipping with JDK with routing built with new, expressive case statements.
Patrik Duditš
Patrik spent most of his career developing web applications on top of Java EE. The passion for this tech stack lead him to work full-time on runtimes and MicroProfile and Jakarta EE specifications at Payara.
His most favorite problems to tackle are distributed systems, monitoring, race conditions but frontend development as well.