r/java • • Oct 17 '26

Killing Reflection at Build Time: Avro, Codename One and Java Code Generation (Foojay Podcast #103)

https://www.youtube.com/watch?v=smHzWWNOyMU

In this episode of the Foojay Podcast, Dmitry Moskalyuk and Shai Almog compare how they cut runtime reflection out of very different projects.

Dmitry runs a backend model layer that takes JSON, XML, YAML and TOML and converts it all to Avro. His choice between Jackson and kotlinx.serialization came down to where the reflection cost actually hides. Shai works on the Codename One code generation pipeline, which aims for no reflection, no service loader and no Class.forName.

Topics include Jackson Blackbird versus kotlinx.serialization, the missing unknown-fields feature that sent one team back to Jackson, generated code (Lombok, Manifold, jOOQ), what Records and Project Leyden change, and build time cost versus runtime cost.

Available in your favorite podcast app and on YouTube:
YouTube: https://www.youtube.com/watch?v=smHzWWNOyMU

Disclosure: I host the Foojay Podcast.

24 Upvotes

21 comments sorted by

View all comments

Show parent comment

-6

u/woj-tek Oct 17 '26

What did you do to make Java better?

Did codenameone made JAVA better?

12

u/shai_almog Oct 17 '26

Well, before we came along no Java developer could build iOS apps. Now there are MANY iOS apps written in Java. That is objectively better. There are many developers who still work with Java across multiple platforms who would have abandoned it for flutter etc. We also enable Java native apps on Win32, Linux, Mac etc. Not possible before we came along and not at the size/RAM levels that we are offering. All 100% free and open source.

We're the only true full stack option for Java developers and we now are also taking this to the backend where Java can finally reach go levels of size/performance which even graal can't reach.

That's ignoring my personal contributions at Sun Microsystems and outside of it over the past 3 decades.

1

u/nlisker Oct 22 '26

We're the only true full stack option for Java developers

How? I've been doing full stack Java in 2018 and didn't use your tech (not saying it's bad). What exactly do you enable that no one else can?

1

u/shai_almog Oct 23 '26

Mention the technology and I'll respond properly, but sure...

There are great tools like TeaVM that we used in the past, that let you do some parts of the stack. We're the only ones that do everything in the full meaning of the word in a single project:

  • Mobile native - iOS, Android (including watch, car, vr etc.)
  • Desktop native (single exe) - Mac, Windows, Linux
  • Web
  • Backend

We're also the only solution that packages all of the pieces together into a single package with the APIs you need for pretty much everything

No other solution for Java comes close. Some do parts of the stack and you can mix and match to get some of the way or generate a webapp which isn't exactly full stack Java because the web finishes the rest of the way.

Yes, I'm defining what "true full stack" means but notice I didn't say "full stack" because for that you do have some solutions.

1

u/nlisker Oct 23 '26

Yes, I'm defining what "true full stack" means but notice I didn't say "full stack" because for that you do have some solutions.

OK, you came up with a new definition so I didn't know it before your explanation. Since you mean you were the only single company that gave solutions to all of those points, then that I won't challenge because I never checked. I used the standard "full stack" definition, by which all of those points were achievable with solutions from multiple companies. I don't really see the need to stick to one company's tech stack. While they probably offer better integration, it's putting all your eggs in one basket.

In 2018 I used javafxports to run on iOS and Android with the same Desktop JavaFX codebase. Later, Gluon switched to the SubstrateVM approach, which worked until Java/FX 24. Now they're doing a mobile-native effort for the JDK. They have some prototypes on iOS but I don't think it's production ready, I haven't checked lately. They also had (have?) CloudLink, which is some backend solution, but I never used it.

I also don't know when javafxports started offering iOS apps and when you did. I do know that until recently you used Retrolambda/RoboVM and were restricted to Java 1.8 while I was able to use Java/FX 24 on iOS and Android (and Raspberry, which I didn't need, along with car/watch...). That was very crucial when Java started releasing every 6 months while 1.8 was stuck in 2014.

From what I know, you also do some of the build process or compilation on your cloud and don't offer a full local build. I could be wrong. Local builds are a requirement in many companies.

For web, I can use JPro for server-side or WebFX for client-side rendering, the latter doesn't support everything. Again, same code base.

I need the GPU acceleration for 3D intensive (relatively speaking) applications that can also run on mobile. JavaFX uses Metal, Opengl ES2, and D3D9/12. I haven't looked what pipelines you guys offer.

1

u/shai_almog Oct 23 '26

We were offering iOS etc. in 2012 well before these guys came along. We NEVER used RoboVM. NEVER!

We were restricted to Java 1.8 with retrolambda we're now on 17+ language level (due to Android limitations) but you can use 25 when working with the environment.

Our project was always open source but in the past we just kept local build as a feature we don't officially support due to the support overhead. This hasn't been true for several years by now. We still offer a cloud option for developers without environment, mac, windows etc. that are needed for native builds.

We have full GPU metal support and full 3d graphics too with a literal GPU package. We also support SIMD etc. We support metal, D3D/DD. OpenGL ES is no longer supported on the platforms so we deleted that pipeline.

1

u/nlisker Oct 23 '26

Thanks for the info.

we're now on 17+ language level (due to Android limitations) but you can use 25 when working with the environment.

17+ implies 17 or above, so what are the limitations? If I use Java 27 I need to compile to a 17 feature level?

We have full GPU metal support and full 3d graphics too with a literal GPU package. We also support SIMD etc. We support metal, D3D/DD. OpenGL ES is no longer supported on the platforms so we deleted that pipeline.

I found the info in the docs:

It runs from one code base on the JavaSE simulator (OpenGL via JOGL), Android (OpenGL ES 2), iOS and macOS (Metal), the native Windows port (Direct3D 11), and the JavaScript port (WebGL)

I see that OpenGL ES 2 is used on Android, or is this outdated? What do your use on Linux?