Using Java for the front-end of a web app in 2022

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • j2cl

    Java to Closure JavaScript transpiler

  • This was a grand stroll down memory lane; having hacked Java since JDK 1.0, I've seen a lot of improvement.

    An idle thought: he favors server-side rendering whereas the javascripts seem to favor client-side rendering. Along the way doing servlets, there came to be "view first" rendering, where you use serverside to paint a minimal page which, itself, uses ajax calls to fill in the blanks. I used that a lot.

    It's true also that I migrated from servlets to node. But, in all of this, clojurescript erupted on the scene. And, for me, that's where the piece gets interesting: he introduces us to a java to clojurescript transpiler and tells us it was used to craft the google app suite. Now it's time to go play [1]

    [1] https://github.com/google/j2cl

  • Vaadin

    Vaadin 6, 7, 8 is a Java framework for modern Java web applications. (by vaadin)

  • A big component library is included and it offers binding for Typscript webcomponents (there's a frontend-centric variant of the framework named Hilla too).

    Frontend states are held in a backend session, so it's safe for manipulations but i'd only recommend it for management UIs.

    [1] https://vaadin.com/

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rules_closure

    Closure rules for Bazel

  • That’s Google Closure [1] with an ‘s’, not ClojureScript [2] with a ‘j’.

    ClojureScript uses the Closure Compiler to optimise its JS output, but that’s the only relationship, and the name is a coincidence.

    [1] https://developers.google.com/closure

  • teavm

    Compiles Java bytecode to JavaScript, WebAssembly and C

  • For a fast, lightweight, Java-based front-end, try TeaVM and its Flavour toolkit:

    https://teavm.org/

    It is easy to get started by using the maven archtetype, there's an tutorial in Java Magazine here:

    https://blogs.oracle.com/javamagazine/post/java-in-the-brows...

    With TeamVM and Flavour you get a full front-end SPA framework that lets you code business logic in Java, and pair that with HTML and CSS to make components.

    To see what it can do, check out Wordii, a fast-paced 5-letter word game:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts