Basics of templating with Cro::WebApp
summary
Cro::WebApp shows a concrete templating system: templates compile to an AST of objects (not Raku bytecode) and JIT-like compilation happens on first request, yielding about 2x faster renderings in the presenter’s tests. Helpers like render_template and template return HTML streams and wire into Cro::HTTP responses; macros, subroutines, loops and conditionals work as expected. The newer template parts feature lets route handlers skip repeatedly passing shared data (e.g. auth/order), and it integrates with Cro routing and authentication as demonstrated.
AI-written summary · about
chapters (9)
- 0:00Introduction to Cro::WebApp
- 2:10HTML templating basics
- 6:09Template helpers and syntax
- 10:22Loops and variables
- 12:47Subroutines and macros
- 14:30Conditional logic
- 17:20Template parts
- 21:41Why Cro::WebApp templates
- 22:15Q&A session
related talks
45mThe next big thing in (client side) templating
34mTemplating - you're doing it wrong
28mCompilers: The New Frontier In Web Performance
32mCompilers: The Next Frontier in Web Performance
45mTurbo-Powered Web Apps - Modern Web Applications with Plain HTML
44mPhoenix: A template engine for Spring
21mFawkes: Faster Mobile Page Loads via App Inspired Static Templating
01h 05mIsomorphic templating with Spring Boot, Nashorn and React
