HNHacker News
TopNewBestAskShowJobs

TeaVMFan

409 karma · joined October 10, 2019

submissionscomments
TeaVMFan··on Show HN: When To Shop At Trader Joe's (using a homegrown Java single-page app)
Article and app author here. Ask me anything about the grocery stats or the technology behind it (CoronaWait uses Flavour, a React-like framework for Java front-end developers).
TeaVMFan··on Writing a Minecraft server from scratch in Bash (2022)
As someone who's done a lot of work with scriptable Minecraft servers for both Java and Bedrock (ScraM), this is impressive. Bonus points for using "duckduckgoing" in a sentence.
TeaVMFan··on Spark – A web micro framework for Java and Kotlin
This appears to be a server-side web framework only.

If your interest is one language (Java or Kotlin) full-stack for a single-page app, you will be interested in my Flavour book: https://frequal.com/Flavour/book.html

TeaVMFan··on Javalin – a simple web framework for Java and Kotlin
This looks useful for server-side web apps. For using Java/Kotlin in a single-page app, I've been using Flavour successfully for many years.

I've written a book about it here: https://frequal.com/Flavour/book.html

TeaVMFan··on Bringing garbage collected programming languages efficiently to WebAssembly
A number of concerns with the viability of the current WASM GC are covered here (Google translation to English):

https://habr-com.translate.goog/ru/articles/757182/?_x_tr_sl...

and the original article:

https://habr.com/ru/articles/757182/

This is from the author of TeaVM, who has 10 years of experience getting Java and JVM code to run efficiently in the browser. https://teavm.org/

TeaVM's existing transpilation of Java to JavaScript performs well (using the browsers JS GC). It will be interesting to see if WASM GC matures to the point where it is even faster.

TeaVMFan··on ASP.NET Core Blazor
I you're after something similar (write a SPA in non-JS) but you prefer Java or Kotlin, check out Flavour: https://flavour.sourceforge.io/

Comparison to Blazor:

* https://frequal.com/java/TeaVmVsBlazorWasm1-0.html

* https://frequal.com/java/TeaVmVsBlazorChart.html

Flavour podcast: https://castini.frequal.com/cast/show/Flavourcast/f7e171e8-2...

Java Magazine article: https://blogs.oracle.com/content/published/api/v1.1/assets/C...

Real, fast-loading apps made with Flavour:

* Wordii, a 5-letter word game: https://frequal.com/wordii

* Tea Sampler: Demo app with code samples of coding with Flavour: https://frequal.com/tea-sampler/

TeaVMFan··on Show HN: An app to create asynchronous micro podcasts
Castini is an app-free, browser-based alternative:

https://castini.frequal.com/

No bloated download. No upgrade treadmill. Just short podacsts with no install.

Castini-hosted podcasts include:

* Castini Show: https://castini.frequal.com/cast/show/Castini%20Show/2394171...

* Flavourcast: https://castini.frequal.com/cast/show/Flavourcast/f7e171e8-2...

TeaVMFan··on React, but in Python
Thanks hu3! No changes since posting, all links tested then and now, 100% working from here.
TeaVMFan··on React, but in Python
If you're interested in this sort of thing, but want to code in Java, try Flavour: https://flavour.sourceforge.io/

Flavour is a fast, batteries-included, type-safe framework for making modern SPA web apps in Java (and other JVM languages).

* Great Lighthouse scores? Check!

* Real SPAs without sluggish network round trips? Check!

* Modern path-based routing? Check!

* Components (built-in and user-defined)? Check!

* Effortless service calls? Check!

* Refactor frontend and backend simultaneously using your current IDE? Check!

If this sounds interesting, check out these other resources:

* Article in Java Magazine: https://blogs.oracle.com/javamagazine/post/java-in-the-brows...

* 100% Flavour 5-letter word game: https://frequal.com/wordii

* Flavour podcast (created with Castini, a Flavour app): https://castini.frequal.com/cast/show/Flavourcast/f7e171e8-2...

TeaVMFan··on CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
The Lighthouse test tool in Chrome, commonly used to test real-world application performance.

TeaVM apps score quite well on Lighthouse. Previous iterations of CheerpJ had challenges in startup time and download size. Results here: https://renato.athaydes.com/posts/comparing-jvm-alternatives...

For a concrete test, try launching this full TeaVM/Flavour 5-letter word game, it downloads in <2s even on mobile. https://frequal.com/wordii/

TeaVMFan··on CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
A while back CheerpJ had a huge footprint and terrible startup time compared to TeaVM: https://renato.athaydes.com/posts/comparing-jvm-alternatives...

TeaVM has become even smaller and faster since that article was published. The test suites are here in case someone wants to conduct a rematch: https://github.com/renatoathaydes/jvm-alternatives-to-js

TeaVMFan··on CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
Agreed that many people will want to build true web single-page apps, not port Swing to the web in a Canvas.

A Java option for modern web apps exists, and it's called Flavour: https://flavour.sourceforge.io/

* Build SPAs in Java with HTML templates and components

* Fast build times and batteries-included build framework

* Easy calls to Java web services, just invoke a method and Flavour handles marshalling and unmarshalling, you just see/use Java objects.

* Full-stack refactoring

* Built on TeaVM, so you get the all the benefits of a mature, performant framework with support for threads and multiple JVM languages (bytecode-based transpilation).

TeaVM vs Blazor comparison chart: https://frequal.com/java/TeaVmVsBlazorChart.html

TeaVM longer comparison with Blazor: https://frequal.com/java/TeaVmVsBlazorWasm1-0.html

Java Magazine article on Flavour and TeaVM: https://blogs.oracle.com/javamagazine/post/java-in-the-brows...

TeaVMFan··on CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
Related, if you like Java but want to create a modern, Lighthouse-ready web app, check out Flavour:

https://flavour.sourceforge.io/

TeaVMFan··on Cheerp 3.0: C++ compiler for the Web, now permissively licensed
A good introductory article is this one from Java Magazine:

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

A good collection of specific, detailed how-to's for various use cases is in Tea Sampler here:

https://frequal.com/tea-sampler/

A more general collection of education and advocacy articles are here:

https://frequal.com/TeaVM/

I do agree that more needs to be written about this mature, permissively-licensed tool that makes Java work in modern browsers. Hopefully these links are a start.

TeaVMFan··on Cheerp 3.0: C++ compiler for the Web, now permissively licensed
While you wait for CheerpJ, please check out TeaVM:

https://teavm.org/

It has a permissive Apache license and numerous success stories:

https://frequal.com/TeaVM/TeaVmBasedSites.html

There is also a full SPA toolkit called Flavour Plus for making pure Java, web-native, full-stack web apps:

https://frequal.com/FlavourPlus/

TeaVMFan··on JavE – Java ASCII Versatile Editor
Can anyone find a source download link? This might work well on the web if transpiled to JS but I don't see the sources anywhere.
TeaVMFan··on KeenType: Pure Java typesetting system
It would be interesting to build this with TeaVM to allow high-quality typesetting for online papers and interactive web content.

TeaVM transpiles Java to JavaScript. I used it to convert a Java interactive fiction project to run natively in the browser:

https://frequal.com/java/RestoringA19YearOldGameWithTeaVm.ht...

More background on TeaVM:

https://teavm.org/

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

TeaVMFan··on WebAssembly for the Java Geek
+1 for TeaVM. Not only is there the Fermyon friendly fork, but WASM/WASI/debugging is seeing a large number of checkins in recent weeks in the main fork.

However, true "Java Geeks" should try the JavaScript support in TeaVM. It is mature and battle-tested. The resulting code runs great in a browser.

Live TeaVM-based game: https://frequal.com/wordii

Getting started with TeaVM: https://frequal.com/TeaVM/

Performance Comparison: https://frequal.com/java/TeaVmPerformance.html

TeaVMFan··on Java Front-End Development in 2023
There is a lot of WASM activity in the TeaVM mainline going on right now. I'm looking forward to even more WASM features in TeaVM in 2023.
TeaVMFan··on Java Front-End Development in 2023
Java and JVM languages are poised for a front-end resurgence, as the pendulum of language typing swings back towards "strong". See the options and learn why TeaVM/Flavour Plus is the best.

https://frequal.com/java/JavaFrontEndDevelopment2023.html

TeaVMFan··on Using Java for the front-end of a web app in 2022
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: * Wordii: https://frequal.com/wordii * Making Wordii using TeaVM and Flavour: https://frequal.com/java/MakingWordiiAPureJavaSpa.html

TeaVMFan··on Java in the Browser
Yes, TeaVM predates Blazor and still has the edge on most fronts:

https://frequal.com/java/TeaVmVsBlazorWasm1-0.html

Comparison Chart: https://frequal.com/java/TeaVmVsBlazorChart.html

TeaVMFan··on Java in the Browser
Yes, TeaVM is still actively maintained by the original author (and contributors). Java 17 record support was recently implemented, for example.

TeaVM is coming up on 10 years, so it has proven its longevity.

TeaVMFan··on Java in the Browser
Actual Java in the browser (working, fast, passes Lighthouse) with TeaVM:

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

For example, try this 5-letter word game:

https://frequal.com/wordii/

TeaVMFan··on Ask HN: Why isn't GWT or Vaadin more popular among Java developers?
TeaVM is faster and more web-centric than either of the mentioned options:

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

* Super fast builds

* Complete Maven builds, no JS build nightmares

* Minifying, obfuscating

* Full, fast, HTML/CSS-based component framework.

* Works with any JVM language, not just Java

See a TeaVM-based game, Wordii: https://frequal.com/wordii/

TeaVMFan··on The balance has shifted away from SPAs
There's also nothing stopping teams from developing the front-end in Java too. Java SPAs have been possible for over five years using TeaVM:

https://teavm.org

It lets you code in Java, compile to a native SPA, and gain all the benefits you'd expect from a single, strongly-typed language top to bottom (refactoring, POJO reuse on the front end, etc.).

There is a full intro article in Java Magazine:

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

TeaVMFan··on Ask HN: Does Java need a modern Java UI toolkit for desktop/web?
SnapKit is a huge framework with lots of functionality. One key part for the browser integration module (SnapTea) is TeaVM https://github.com/konsoletyper/teavm

TeaVM converts Java code to run in the browser. It provides the ability to call JS functions to access browser features like canvas and XHR. However, unless you want to be coding like Vanilla JS, you'll want a framework on top. SnapKit provides that.

TeaVMFan··on Ask HN: Does Java need a modern Java UI toolkit for desktop/web?
SnapTea leverages TeaVM https://github.com/konsoletyper/teavm to convert Java to JS. However, SnapKit provides an entire UI framework layer too, enabling app portability to other environments (like the desktop JRE).
TeaVMFan··on Ask HN: Does Java need a modern Java UI toolkit for desktop/web?
SnapKit lets you code in Java but deploy as transpiled JS when using SnapTea. No JRE, just a native browser app. Try the demos, it is quite, well, snappy.
TeaVMFan··on Ask HN: Does Java need a modern Java UI toolkit for desktop/web?
I have been impressed with SnapKit since first learning of it.

The discipline and effort required to build the proper framework-level abstractions to be portable to future UI toolkits is extremely impressive.

And unlike some other projects, most of the demos are non-trivial, substantial apps. Even Swing doesn't have demos like these.

Congrats, Jeff!

← PreviousPage 4 of 6Next →