Home / Java Patterns and Pitfalls     frequal.com

TeaVM/Flavour: A Great Web Toolkit for Java

If you are one of the many Java developers who wants to make a quick, fast, web application, you owe it to yourself to check out TeaVM and Flavour. This pair of tools lets you create single-page web apps using Java tooling, with convenient hooks to communicate with your Java back-end. Remember the joy, convenience, and productivity of a strongly-type language and great tools from top to bottom of your app? Those days are back!

Java for the Modern Browser

TeaVM converts ("transpiles") Java bytecode into modern JavaScript. This lets you write Java code that can execute in the browser, along with pre-built convenience wrappers for numerous popular browser APIs.

Flavour takes it to the next level, providing type-safe HTML templates, binding, and service wrappers for Java. The demos show the power of this combination.

Full-stack, In-browser Java!

Now you can build a full-stack application in a single Maven project. Your back-end can provide a JAX-RS service, and the Flavour front-end can easily and quickly invoke the service, and manipulate the data in-browser. Since the TeaVM/Flavour code is executing in-browser, it can instantly respond to user interaction without requiring a round trip. No need for legacy technologies that require round-trips for each click or focus change. You will be blown away by the performance.

Deep Dive

Read on for some specific use cases and how to solve them with TeaVM:
Last modified on 5 Aug 2018 by AO

Copyright © 2024 Andrew Oliver