Handlebars.java
jte
Handlebars.java | jte | |
---|---|---|
2 | 31 | |
1,428 | 707 | |
- | - | |
8.2 | 8.8 | |
about 18 hours ago | 6 days ago | |
Java | Java | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Handlebars.java
-
Full Time
The blog is just hugo so it's 100% static files over nginx.
The search engine is serverside-rendered mustache templates via handlebars[1], via served via spark[2]. It's basically all vanilla Java. I do raw SQL queries instead of ORM, which makes it quite a bit snappier than most Java applications. The sheer size of the database also mandates that basically every query is a primary key lookup. The code is written around that constraint.
Although the search engine is a bit on the slow side since it's routed through cloudflare and I think I'm relatively far away from the closest datacenter so it adds like 100ms to the load times.
[1] https://github.com/jknack/handlebars.java
[2] https://sparkjava.com/
-
Spring Boot & HTMX ?
tl;dr - if you are working with Spring Boot, the main way to build a web UI is either Thymeleaf or maybe https://github.com/jknack/handlebars.java with HTMX and _hyperscript and/or Alpine.js. If you aren't really into CSS if you couple those with something like https://picocss.com/ you can build pretty good looking stuff pretty fast. Honestly if you go through setting that stuff up you will be in a good spot to keep going with other stuff later.
jte
-
Templ: A language for writing HTML user interfaces in Go
For java/Kotlin, we are using JTE (https://jte.gg/#getting-started), pretty nice build tooling and IDE support to generate pre-compiled templates without additional code generation steps.
-
Announcing jte 3 - The Java Template Engine
Thanks for the hints! I created an issue for this: https://github.com/casid/jte/issues/240
-
Opened a ticket to jetbrains around tailwind support for JTE
JTE is a template engine for Java/Kotlin that I've started using recently. While trying to integrate tailwind I've run into issue with the (notorious) IntelliJ tailwind plugin. I've opened a ticket with JetBrains to ask that they add *.kte and *.jte file extensions to the tailwind plugin. If anyone else is keen for this change to be made, please upvote the linked ticket.
-
Project YALA - MongoDB Atlas Hackathon 2022 on DEV submission
Instead of using commonly used frameworks (like Spring Framework) I preffered to use something that is small and doesn't have "magic" in it. So I've chosen Javalin as a simple web framework, added MongoDB client libraries nad jte as template engine. To show that simple and clean looking apps doesn't need any big JS libraries I've selected chota - one of micro CSS frameworks.
- Web app in Java with Template Engine
-
Quick preview of jstachio a type safe java mustache templating engine
Because the code is generated Java code the runtime dependency is minimal and I plan on offering a zero dependency runtime version. I believe to have one of the smallest footprints of Java templating languages and is as fast as jte.
- Using java for the front-end of a web app in 2022
-
Rapidly develop CRUD apps (and Apache Isis experience?)
A microframework or Spring Boot + Template Engine such as jte or Thymeleaf gets you far.
- jte 2
-
Java SSR / web ui
I can highly recommend https://github.com/casid/jte
What are some alternatives?
Thymeleaf - Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
Rocker - Java 8 optimized, memory efficient, speedy template engine producing statically typed, plain java objects
FreeMarker - Apache Freemarker
jte-spring-boot-demo - A simple demo of jte running with Spring Boot.
Apache Velocity - Mirror of Apache Velocity Engine
stringtemplate4 - StringTemplate 4
Pebble - Java Template Engine
Mustache.java - Implementation of mustache.js for Java
htmx - </> htmx - high power tools for HTML
Jtwig Project - Java modern template engine
j2html - Java to HTML generator. Enjoy typesafe HTML generation.