The Internet evolved so much the last 20 years that – It has becomed impossible to create indepedently Java Web Applications – without JavaScript, CSS, TypeScript, the HTTP protocol and all the technical details of the Web. Here are the most close attempts.
Vaadin Web Applications
Vaadin Framework is the king of abstracting the Web / HTTP Protocol for Java Developers. You could code all your business logic, have a UI that will render on the web and actually never touch any JavaScript / CSS. In most cases you will not care about the underlying technologies. But, if you do – It takes advantage of Lit Framework for creating components and Hilla for bridging the front-end and the backend. Optionally – you could use CSS and execute JavaScript from the Vaadin Element API.
Google Web Toolkit
Google Web Toolkit https://www.gwtproject.org/gettingstarted-v2.html allows you to write JavaScript Code in Java. For your code to work – the client-side code needs to be from the sub-set of Java Classes that the engine knows hot to convert to JS.
Web FX
Web FX https://github.com/webfx-project/webfx is similar to GWT, but it sits on top of JavaFX.
Flutter (close enough)
Flutter Framework uses Dart as programming language so it is not exactly Java. But, in my personal experience – it is the closes to Java from all the other Frameworks I’ve seen.
- It recommends Componentisation.
- It allows inheritence,
- functional programming approach
- etc
You could code your BackEnd with Spring – Boot or any other Framework and have very strict separation of Front-End and Backend.
Templating Engines
Spring Boot allows you to integrate several Templating Engines. I’ve written about Velocity Engine. It does get you the best SEO, as it uses Server Side Rendering. But, Using this for the front-end feel more like a last century approach.