Hacker News new | past | comments | ask | show | jobs | submit login

J2CL attempts to solve a much different problem than GWT. It does not try to replace js or js developers.

J2CL is designed for cross platform code reuse. For example, the code powering Google Docs front end needs to be written for web, Android and iOS. J2CL does the transpilation of all document manipulation and rendering logic from Java -> JS (and accomplishes this with unprecedented js code size). The UI is still written in JS.

Java -> Android

Java -> Backend Server

Java -> J2objc -> iOS

Java -> J2CL -> JS/web.

Does that mean internally Google would be using Closure Library for UI with J2CL? And other GWT applications were migrated to Angular or Dart?

Depends on the project. Google 'Apps' use J2CL for shared business logic between platforms, but the UI on each platform is handmade. For the Web, Soy templating is heavily used (known externally as Closure Templates IIRC), along with Closure library primitives. Style Sheets are written in Closure's style sheet syntax and compiled and optimized as well.

With the Elemental2 library and JsInterop this could easily be written in Java "to the metal" as well, but so much of existing Web code is already in Soy and JS, it makes more sense to reuse that.

Thanks @cromwellian!

We are currently looking on what to do with our quite massive GWT app. Already in the process of RPC to REST switch, with Angular, AngularDart and GWT3 (depending what it would end up to be) as options.

Just wanted to check if we are missing an alternative

Applications are open for YC Winter 2021

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact