Handlebars.java
Pebble
Handlebars.java | Pebble | |
---|---|---|
2 | 6 | |
1,427 | 1,069 | |
- | 0.3% | |
8.2 | 6.1 | |
10 days ago | about 2 months ago | |
Java | Java | |
GNU General Public License v3.0 or later | BSD 3-clause "New" or "Revised" License |
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.
Pebble
- Web app in Java with Template Engine
-
Alternative to Thymeleaf for template engine?
Pebble, inspired by PHP’s Twig, similar to Python’s Jinja2, Ruby’s Liquid & NodeJS’s Nunjucks.
-
Options for high level front-end frameworks for Java developers
If it's a simple project and you're not affraid of writing html & css, tbh I would suggest freemarker or Pebble (https://github.com/PebbleTemplates/pebble). To make things dynamic, you can use a bit of javascript (even some Vue.js there and there).
-
What's the standard(if any) templating engine used in Spring?
When it comes to server-side template in Java, I also prefer Twig/Jinja/Liquid-like engines. In Java, there are two known engines of such type -JTwig and Pebble Templates. I have tried both and prefer the latter - Pebble. JTwig, btw, is no longer maintained.
-
Django 4.0 release candidate 1 released
Have you tried https://pebbletemplates.io/ for Java?
I haven't used it extensively, so I can't speak how it compares to Django in larger setups.
-
Pebble VS jte - a user suggested alternative
2 projects | 11 Sep 2021
What are some alternatives?
Thymeleaf - Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
FreeMarker - Apache Freemarker
Apache Velocity - Mirror of Apache Velocity Engine
Mustache.java - Implementation of mustache.js for Java
Jtwig Project - Java modern template engine
JsonBatch - An Engine to run batch request with JSON based REST APIs
jte - Secure and speedy templates for Java and Kotlin.