Isomorphic templating with Spring Boot, Nashorn and React
summary
Spring Framework 4.2 adds script templating that runs JavaScript template engines on the JVM via Nashorn (or Jython/JRuby) and integrates with Spring MVC and Spring Boot; example stack uses Handlebars/React loaded from webjars, compiled with Gradle, server-rendered to HTML and then rehydrated on the client with React and Server-Sent Events for live updates. Benchmarks show simple Handlebars at 500 pages/sec without cache and 6,000 pages/sec with cache; concurrency requires choosing shared engine vs per-thread engine to avoid global-state races.
AI-written summary · about
chapters (9)
- 0:00Introduction to talk
- 1:14What isomorphic means
- 5:30Nashorn templating in Spring
- 10:49Handlebars with Spring MVC
- 29:45React introduction
- 34:40Building isomorphic app with React
- 43:23Live demo of React app
- 53:34Future of isomorphic apps
- 57:32Conclusion and Q&A
related talks
44mPhoenix: A template engine for Spring
41mRapid server side full stack web development with ViewComponents and htmx
46mModern Frontends with HTMX, Thymeleaf and Spring Boot
48mGetting Thymeleaf ready for Spring 5 and Reactive
34mModern frontends using Spring Boot and Thymeleaf with htmx
51mFun with the Functional Web Framework
14mBuilding React applications with JHipster
45mThe next big thing in (client side) templating
