Handlebars.java
javalin.github.io
Handlebars.java | javalin.github.io | |
---|---|---|
2 | 27 | |
1,428 | 35 | |
- | - | |
8.2 | 8.2 | |
about 16 hours ago | 17 days ago | |
Java | HTML | |
GNU General Public License v3.0 or later | - |
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.
javalin.github.io
- Java EE or Python Django?
- Javalin – a simple web framework for Java and Kotlin
- Spark – A web micro framework for Java and Kotlin
- Javalin: A simple web framework for Java and Kotlin
-
Show HN: Zero-dependency Java framework out of beta
The size statistics page is super cool: https://github.com/byronka/minum/blob/master/docs/size_compa...
Reasoning this way about software and dependencies more often seems like a good thing, just so we're aware of what we're actually getting into, especially with projects that use npm.
I actually hadn't heard of Javalin before, which also seems nice: https://javalin.io/
Aside from that, I've also had good experiences with Dropwizard - which is way simpler than Spring Boot but at the same time uses a bunch of idiomatic packages (like Jetty, Jersey, Jackson, Logback and so on): https://www.dropwizard.io/en/stable/
I do wonder whether Minum would ever end up on the TechEmpower benchmarks and how it'd stack up against the other libraries/frameworks there, those benchmarks are pretty interesting.
- Java 21 Released
-
Helidon Níma is the first Java microservices framework based on virtual threads
Counter-example: https://javalin.io/ uses Servlets, and seems to be doing quite fine without annotations.
-
Full Time
Yes, and it was not that well designed to be honest... the successor is quite a lot nicer and it's called Javalin[1].
Same philosophy but just got things right where Spark, being the "first" (in the Java world, using the design inherited by Sinatra[2]) had a few design issues.
[1] https://javalin.io/
[2] https://sinatrarb.com/
- Show HN: Java REST without annotations, DI nor reactive streams
-
Is it just me, or does the Spring Framework lead to hard-to-maintain code and confusion with annotations?
I strongly advocate frameworks like https://javalin.io/ and Jooq (https://www.jooq.org/) if you are going to start a new project in Java.
What are some alternatives?
Thymeleaf - Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
ktfmt - A program that reformats Kotlin source code to comply with the common community standard for Kotlin code conventions.
FreeMarker - Apache Freemarker
Vert.x - Vert.x is a tool-kit for building reactive applications on the JVM
Apache Velocity - Mirror of Apache Velocity Engine
minum - A minimalist Java web framework built from scratch
Pebble - Java Template Engine
Jetty - Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Mustache.java - Implementation of mustache.js for Java
jbang - Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
Jtwig Project - Java modern template engine
undertow-examples