<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shai Almog</title>
    <description>The latest articles on DEV Community by Shai Almog (@codenameone).</description>
    <link>https://dev.clauneck.workers.dev/codenameone</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F417973%2Fa7b22dd9-5565-48f5-bfab-7e5035b3888f.png</url>
      <title>DEV Community: Shai Almog</title>
      <link>https://dev.clauneck.workers.dev/codenameone</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.clauneck.workers.dev/feed/codenameone"/>
    <language>en</language>
    <item>
      <title>Ship Your Game on Steam, and Why the Art Matters More Than the Engine</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Tue, 24 Nov 2026 00:48:37 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/ship-your-game-on-steam-and-why-the-art-matters-more-than-the-engine-1n28</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/ship-your-game-on-steam-and-why-the-art-matters-more-than-the-engine-1n28</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwrcsc77syp39zxrqfi4q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwrcsc77syp39zxrqfi4q.jpg" alt="Splat, a team paintball shooter, headed to Steam" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The engine is the least important decision in a small game. Art decides whether people play it, the server decides whether it's fair, and the store decides whether anyone finds it. Splat, our third game template after Skirmish and &lt;a href="https://www.codenameone.com/blog/build-an-endless-runner-in-java/" rel="noopener noreferrer"&gt;Dash&lt;/a&gt;, is a first person team paintball shooter, four against four, in 3D, online, written in Java with Codename One. It's the kind of game people assume needs a commercial engine. Watch it first and judge for yourself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/splat-desktop-demo.mp4" rel="noopener noreferrer"&gt;Download the desktop video&lt;/a&gt;.

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-home.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-home.png" alt="The Splat home screen on a phone" width="800" height="1422"&gt;&lt;/a&gt;Home on a phone.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-match-overhead.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-match-overhead.png" alt="A Splat match seen from above" width="800" height="1422"&gt;&lt;/a&gt;A match from above.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-mission-editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-mission-editor.png" alt="The Splat mission editor" width="800" height="470"&gt;&lt;/a&gt;The mission editor.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-mission-playtest.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-mission-playtest.png" alt="Play testing a custom Splat field" width="800" height="470"&gt;&lt;/a&gt;Play testing a field.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-party-chat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-party-chat.png" alt="A Splat party lobby with voice chat" width="800" height="1422"&gt;&lt;/a&gt;Party lobby and voice.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-instant-replay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-instant-replay.png" alt="A Splat instant replay" width="800" height="1422"&gt;&lt;/a&gt;Instant replay.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;It's paintball, and it never stops making fun of itself. Every match opens with a mission briefing read in the gravest voice available, and every hit stamps a big red &lt;strong&gt;PAINTED&lt;/strong&gt; across your goggles.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lesson: the engine isn't the star
&lt;/h2&gt;

&lt;p&gt;I'll start with what surprised me, because it's the most useful thing in this post.&lt;/p&gt;

&lt;p&gt;The first playable Splat drew its fields and players from shapes generated in code. The networking worked, the shots were lag compensated, the referee caught cheaters. It looked like a tech demo, and nobody wanted to play it for more than a minute.&lt;/p&gt;

&lt;p&gt;Then we replaced the shapes with real art: CC0 models from &lt;a href="https://quaternius.com" rel="noopener noreferrer"&gt;Quaternius&lt;/a&gt; and &lt;a href="https://kenney.nl" rel="noopener noreferrer"&gt;Kenney&lt;/a&gt;, photo scanned props and ground textures from &lt;a href="https://polyhaven.com" rel="noopener noreferrer"&gt;Poly Haven&lt;/a&gt;, players built with MakeHuman and type set in Rajdhani. Nothing else changed, and it was suddenly a game.&lt;/p&gt;

&lt;p&gt;Only after that did we add the engine features. Fog with height falloff, PBR materials, directional shadows and post processing all went into the framework because the art deserved them, not the other way around. If you're building a game, budget for the artist first. A better renderer makes good art look great. It does nothing for boxes.&lt;/p&gt;

&lt;p&gt;CC0 means none of those artists asked for credit. We credit them anyway, in &lt;code&gt;scripts/splat/ART.md&lt;/code&gt;, along with the steps to re-skin every model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the framework gained
&lt;/h2&gt;

&lt;p&gt;Building Splat added these to &lt;code&gt;com.codename1.gpu&lt;/code&gt;, on every GPU backend: OpenGL in the simulator and on Linux, Android, WebGL in the browser, Metal on iOS and Direct3D 11 on Windows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Environment&lt;/code&gt;&lt;/strong&gt;: exponential fog with height falloff, hemisphere ambient light, exposure and tone mapping, and a procedural sky through &lt;code&gt;Environment.setSky&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Material.Type.PBR&lt;/code&gt;&lt;/strong&gt;: metallic and roughness, emissive and vertex color, filled from glTF.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows&lt;/strong&gt;: directional shadow maps through &lt;code&gt;Light.setShadows&lt;/code&gt;, softened with percentage closer filtering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;PostProcess&lt;/code&gt;&lt;/strong&gt; on a &lt;code&gt;GameView&lt;/code&gt;: bloom, color grading, vignette and grain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;GpuCapabilities&lt;/code&gt;&lt;/strong&gt;: on a device without shadow or offscreen support the scene draws directly instead of failing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-desktop-match.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="470" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-desktop-match.png" alt="A Splat match on the desktop with fog and shadows"&gt;&lt;/a&gt;A match on the desktop.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-briefing.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-briefing.png" alt="A Splat mission briefing" width="800" height="1422"&gt;&lt;/a&gt;The briefing.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-scoreboard.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-scoreboard.png" alt="The Splat scoreboard" width="800" height="1422"&gt;&lt;/a&gt;The scoreboard.&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The server is the referee
&lt;/h2&gt;

&lt;p&gt;In a shooter, whoever decides a hit decides the game. If the phone decides, a modified client wins every fight. Splat's backend runs the match and the phone predicts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBQW1Bob25lPGJyLz5wcmVkaWN0cyBtb3ZlbWVudCBhbmQgc2hvdHNdIC0tPnxpbnB1dHMgb3ZlciBXZWJTb2NrZXR8IFNbQmFja2VuZCByZWZlcmVlPGJyLz4zMCBIeiBmaXhlZC1wb2ludCBydWxlc10KICAgIFMgLS0-fGF1dGhvcml0YXRpdmUgc3RhdGV8IFAKICAgIFMgLS0-IFJbUmV3aW5kcyB0byB0aGUgc2hvb3RlcidzIHZpZXc8YnIvPnRvIGNoZWNrIHRoZSBoaXRdCiAgICBTIC0tPiBBW0FudGktY2hlYXQgZmxhZ3MsIFhQLCByYXRpbmddCiAgICBTIC0tPiBSUFtSZXBsYXlzIGFuZCBsZWFkZXJib2FyZHNd%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBQW1Bob25lPGJyLz5wcmVkaWN0cyBtb3ZlbWVudCBhbmQgc2hvdHNdIC0tPnxpbnB1dHMgb3ZlciBXZWJTb2NrZXR8IFNbQmFja2VuZCByZWZlcmVlPGJyLz4zMCBIeiBmaXhlZC1wb2ludCBydWxlc10KICAgIFMgLS0-fGF1dGhvcml0YXRpdmUgc3RhdGV8IFAKICAgIFMgLS0-IFJbUmV3aW5kcyB0byB0aGUgc2hvb3RlcidzIHZpZXc8YnIvPnRvIGNoZWNrIHRoZSBoaXRdCiAgICBTIC0tPiBBW0FudGktY2hlYXQgZmxhZ3MsIFhQLCByYXRpbmddCiAgICBTIC0tPiBSUFtSZXBsYXlzIGFuZCBsZWFkZXJib2FyZHNd%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="756" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The shared simulation code is fixed point and deterministic, and the same code runs on the phone and on the server. A golden corpus of recorded matches replays in CI, so a change that alters the outcome of a past match fails the build. Shots are lag compensated: the server rewinds to what the shooter saw, within a cap, so a hit that looked right on a slow connection counts.&lt;/p&gt;

&lt;p&gt;Around the match there's matchmaking by skill, parties with lobby codes and WebRTC voice chat, instant replays, a shop with store receipts checked against Apple and Google, and an admin console with moderation. The sound effects, music and ambience are all synthesized in code, so no audio files ship at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build your own field
&lt;/h2&gt;

&lt;p&gt;The mission builder lets players design a field on the phone or the desktop, play test it against bots and publish it to friends. You build one half and the other half mirrors it, so every field is fair.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/splat-mobile-mission-builder.mp4" rel="noopener noreferrer"&gt;Download the phone video&lt;/a&gt;.

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/splat-mobile-demo.mp4" rel="noopener noreferrer"&gt;Download the phone gameplay video&lt;/a&gt;.

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/splat-desktop-mission-builder.mp4" rel="noopener noreferrer"&gt;Download the desktop mission builder video&lt;/a&gt;.

&lt;h2&gt;
  
  
  Steam: the console you're allowed to ship on
&lt;/h2&gt;

&lt;p&gt;Last week I wrote that &lt;a href="https://www.codenameone.com/blog/codename-one-on-xbox/" rel="noopener noreferrer"&gt;shipping on consoles needs SDKs behind NDAs&lt;/a&gt;. Steam is the exception. Valve's Steam Machine and the Steam Deck run Linux, Steamworks is open to any developer who pays the app fee, and the same binary runs on Linux desktops. It's the one major open console.&lt;/p&gt;

&lt;p&gt;Codename One publishes to Steam with the native Linux port: one native executable, no JVM, packaged as a Steam depot and uploaded with SteamPipe. Set the app id:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="na"&gt;codename1.arg.steam.appId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;480&lt;/span&gt;
&lt;span class="na"&gt;codename1.arg.steam.branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;beta&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then build locally, or let the cloud do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mvn cn1:buildSteamLocal                   &lt;span class="c"&gt;# depot in linux/target/steam&lt;/span&gt;
mvn cn1:steamUpload -Dsteam.user=builder  &lt;span class="c"&gt;# upload with SteamCMD&lt;/span&gt;
mvn cn1:buildSteam                        &lt;span class="c"&gt;# or build in the cloud&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the build cloud console you save your Steam builder account once, then press "Submit to Steam" or turn on submitting every build. Valve only lets an upload go live on a beta branch, so promotion to the default branch and Valve's review happen on the Steamworks site, as they do for everyone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Controllers and Steam features from portable code
&lt;/h3&gt;

&lt;p&gt;Games on Steam are expected to work with a controller, and players on the Deck and in Big Picture mode often have nothing else. Every gamepad Steam knows about arrives through &lt;code&gt;Gamepads&lt;/code&gt;, and forms can be navigated with the D-pad with no code at all:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Gamepad&lt;/span&gt; &lt;span class="n"&gt;pad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Gamepads&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getGamepad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pad&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isConnected&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAxis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Gamepad&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;AXIS_LEFT_X&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// -1..1, dead zone applied&lt;/span&gt;
    &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="n"&gt;jump&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isButtonDown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Gamepad&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;BUTTON_A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Achievements, stats, cloud saves, rich presence, DLC ownership and the overlay go through &lt;code&gt;GameServices&lt;/code&gt;. Off Steam the calls do nothing, so the same game builds for iOS and Android unchanged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isAvailable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;             &lt;span class="c1"&gt;// true on Steam&lt;/span&gt;
    &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;unlockAchievement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"FIRST_WIN"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"wins"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getStatInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"wins"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeSave&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"slot1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;saveBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The app starts full screen, text fields open Steam's on-screen keyboard in Gaming Mode, and &lt;code&gt;isControllerFirst()&lt;/code&gt; tells you when to show controller prompts instead of mouse hints.&lt;/p&gt;

&lt;p&gt;A few things the Steam runtime doesn't provide: there's no embedded browser, no GStreamer media playback and no secure storage. Games rarely need them, but check the &lt;a href="https://www.codenameone.com/developer-guide/#steam" rel="noopener noreferrer"&gt;Steam chapter&lt;/a&gt; before you plan around one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more
&lt;/h2&gt;

&lt;p&gt;Generate Splat from the Initializr, read the implementor's guide in the developer guide, and swap the art for your own. Then point it at Steam. If you ship a game this way, send it to me. I'd love to play it.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Kafka Listeners, Mail and Live Streams in Your Backend, With Records as Entities</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Mon, 23 Nov 2026 15:48:51 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/kafka-listeners-mail-and-live-streams-in-your-backend-with-records-as-entities-13ae</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/kafka-listeners-mail-and-live-streams-in-your-backend-with-records-as-entities-13ae</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5n67y7wmih9pura34q11.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5n67y7wmih9pura34q11.jpg" alt="Kafka, mail and records in the Codename One backend" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On Friday I said that &lt;a href="https://www.codenameone.com/blog/shopify-was-wrong-and-right-to-dump-react-native/" rel="noopener noreferrer"&gt;one codebase pays twice&lt;/a&gt; when it includes the server. That claim is worthless if the server can't do what a real service does: consume a queue, send a receipt email, push live updates and store data in the shape the language prefers. This week the Codename One backend does all four, and on the last one it does something JPA still forbids.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The backend compiles Java to C and then to a native executable. Listener wiring, repositories and builders are generated at build time, with no proxies and no reflection at run time. The annotations follow Spring's, because a controller that moves over with no edits is worth more than a clever new API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr26mw2idpdunswu2kk6n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr26mw2idpdunswu2kk6n.png" alt="Java compiled to C to a native binary, and a request travelling through a host thread and a virtual thread to the handler" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Records as entities: ahead of JPA
&lt;/h2&gt;

&lt;p&gt;Records have been in Java since 16. They're the obvious shape for data: immutable, with &lt;code&gt;equals&lt;/code&gt;, &lt;code&gt;hashCode&lt;/code&gt; and &lt;code&gt;toString&lt;/code&gt; for free. Yet the Jakarta Persistence spec still requires an entity to be a non-final class with a no-argument constructor that the provider can mutate. A record is none of those, so you can't make one a JPA entity. Hibernate accepts records as embeddables and stops there.&lt;/p&gt;

&lt;p&gt;Codename One's ORM maps them, on the device and on the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Entity&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;Note&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Id&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nd"&gt;@Version&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;@DbTransient&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;scratch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The build generates a builder for each record, including a copy builder for changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Notes&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Repositories&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;beginTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Note&lt;/span&gt; &lt;span class="n"&gt;saved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NoteBuilder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Groceries"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// saved.id() is the generated key&lt;/span&gt;
&lt;span class="nc"&gt;Note&lt;/span&gt; &lt;span class="n"&gt;changed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NoteBuilder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;saved&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;commitTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;save&lt;/code&gt; returns a managed copy that carries the generated key and the new version. The record you passed in is never changed, which is what immutability is supposed to mean. Records are read through their accessors and built through the canonical constructor, and nothing is woven into the class.&lt;/p&gt;

&lt;p&gt;Relationships use &lt;code&gt;Ref&amp;lt;T&amp;gt;&lt;/code&gt;, because a record can't have a field set after it's built:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Entity&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;Purchase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Id&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;@ManyToOne&lt;/span&gt; &lt;span class="nc"&gt;Ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Customer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;amountCents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;Purchase&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Purchase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;customerId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;          &lt;span class="c1"&gt;// no query&lt;/span&gt;
&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="c1"&gt;// loads the customer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are limits, and the build tells you when you hit one. Records need sources compiled at Java 17. A record that holds its own entity type, a &lt;code&gt;Map&lt;/code&gt; relationship or a lazy &lt;code&gt;Optional&lt;/code&gt; fails the build with an explanation, and relationships inside an embedded record aren't supported. Records run on iOS and every other target ParparVM translates.&lt;/p&gt;

&lt;p&gt;I like this one because it's a case of us leading instead of following. JPA users have asked for record entities since records shipped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kafka, RabbitMQ and Redis with the annotations you know
&lt;/h2&gt;

&lt;p&gt;Messaging is one API over seven transports, selected by a URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="na"&gt;cn1.messaging.url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//kafka-1:9092,kafka-2:9092&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;memory:&lt;/code&gt;, &lt;code&gt;db:&lt;/code&gt;, &lt;code&gt;redis://&lt;/code&gt; (Streams), &lt;code&gt;amqp://&lt;/code&gt; (RabbitMQ), &lt;code&gt;kafka://&lt;/code&gt;, &lt;code&gt;sqs://&lt;/code&gt; and &lt;code&gt;pubsub://&lt;/code&gt; are supported, with TLS forms for each. Spring Boot's own properties, such as &lt;code&gt;spring.kafka.bootstrap-servers&lt;/code&gt;, are read too. With a database and no URL, messages go through a table, which is often all a small service needs.&lt;/p&gt;

&lt;p&gt;Sending a message inside a transaction writes it to an outbox, and it goes out after the commit. A rolled back order never announces itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Component&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Checkout&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;DataSource&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;MessageTemplate&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Checkout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;DataSource&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;MessageTemplate&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@Transactional&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;place&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;IOException&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"INSERT INTO orders (id, customer) VALUES (?, ?)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="kt"&gt;Long&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;valueOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"orders.placed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;@Component&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Shipping&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;@MessageListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"orders.placed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"shipping"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;concurrency&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;placed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// ship it&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Code ported from Spring can keep &lt;code&gt;@KafkaListener(topics = ..., groupId = ...)&lt;/code&gt;, &lt;code&gt;@RabbitListener(queues = ...)&lt;/code&gt; and &lt;code&gt;@JmsListener&lt;/code&gt; as written. Delivery is at least once, with consumer groups, retries and a dead letter destination per topic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBUWyJAVHJhbnNhY3Rpb25hbCBwbGFjZSgpIl0gLS0-IERCWyhvcmRlcnMpXQogICAgVCAtLT4gT0JbKG91dGJveCldCiAgICBPQiAtLT58YWZ0ZXIgY29tbWl0fCBCUltLYWZrYSAvIFJhYmJpdE1RIC8gUmVkaXMgLyBTUVNdCiAgICBCUiAtLT4gTFsiQE1lc3NhZ2VMaXN0ZW5lcjxici8-Z3JvdXAgc2hpcHBpbmciXQogICAgTCAtLT58ZmFpbHMgcmVwZWF0ZWRseXwgRExRW29yZGVycy5wbGFjZWQuZGxxXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBUWyJAVHJhbnNhY3Rpb25hbCBwbGFjZSgpIl0gLS0-IERCWyhvcmRlcnMpXQogICAgVCAtLT4gT0JbKG91dGJveCldCiAgICBPQiAtLT58YWZ0ZXIgY29tbWl0fCBCUltLYWZrYSAvIFJhYmJpdE1RIC8gUmVkaXMgLyBTUVNdCiAgICBCUiAtLT4gTFsiQE1lc3NhZ2VMaXN0ZW5lcjxici8-Z3JvdXAgc2hpcHBpbmciXQogICAgTCAtLT58ZmFpbHMgcmVwZWF0ZWRseXwgRExRW29yZGVycy5wbGFjZWQuZGxxXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="1224" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each broker protocol is written on the backend's own network layer, with no client library, and a protocol your configuration doesn't name isn't compiled into the executable. That has a cost: Kafka reads gzip but not snappy, lz4 or zstd yet, and doesn't do transactions or SASL. The &lt;a href="https://www.codenameone.com/developer-guide/#backend-messaging" rel="noopener noreferrer"&gt;messaging chapter&lt;/a&gt; lists every limit.&lt;/p&gt;

&lt;p&gt;The same release adds a shared key value store, &lt;code&gt;cn1.kv.url=redis://...&lt;/code&gt;, which works with Redis, Valkey, and KeyDB. It backs the cache, sessions, rate limiting and the locks that keep a &lt;code&gt;@Scheduled&lt;/code&gt; job from running on two servers at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Email from the backend
&lt;/h2&gt;

&lt;p&gt;Signup confirmations, receipts, password resets. Every service sends mail, and every service eventually sends a welcome email for an account whose transaction rolled back. Codename One stages mail sent inside a transaction and sends it on commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Transactional&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;IOException&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"INSERT INTO accounts (name, email) VALUES (?, ?)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;mail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Mail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Welcome, "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Your account is ready."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="na"&gt;cn1.mail.url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;smtp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//${SMTP_USER}:${SMTP_PASSWORD}@smtp.example.com:587&lt;/span&gt;
&lt;span class="na"&gt;cn1.mail.from&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;Acme&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;@&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SMTP with STARTTLS, SMTPS and Amazon SES are supported, plus &lt;code&gt;log:&lt;/code&gt; and &lt;code&gt;memory:&lt;/code&gt; for development and tests. Templates, attachments and inline images work. Failed sends retry with backoff for up to six attempts, permanent failures aren't retried, and mail that gives up lands in a table you can inspect. The built-in security module now uses it for email verification, password reset and mailed sign-in codes. Receiving mail and DKIM signing aren't supported; use your provider for those.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server-sent events
&lt;/h2&gt;

&lt;p&gt;Prices, progress bars and LLM tokens all need a server that pushes. WebSockets are the heavy answer. Server-sent events are plain HTTP, pass through proxies, and reconnect by themselves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/prices"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;HttpServer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Response&lt;/span&gt; &lt;span class="nf"&gt;prices&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HttpServer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Request&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Sse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lastEventId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;idle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;idle&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;idle&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;newest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;PriceBoard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;newest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newest&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;last&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Long&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;PriceBoard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;since&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;last&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;newest&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;idle&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nc"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;InterruptedException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;lastEventId()&lt;/code&gt; lets a reconnecting client resume where it stopped, and &lt;code&gt;HttpProxy&lt;/code&gt; relays event streams unchanged, so a backend can forward an LLM provider's token stream to the app without buffering it.&lt;/p&gt;

&lt;h2&gt;
  
  
  More of Spring, fewer workarounds
&lt;/h2&gt;

&lt;p&gt;We keep porting real services to the backend, starting with our own build cloud, and every port finds small gaps. This round closed a long list: per call repository transactions, &lt;code&gt;@Lock&lt;/code&gt; on derived finds and queries, the &lt;code&gt;Before&lt;/code&gt;, &lt;code&gt;After&lt;/code&gt;, &lt;code&gt;Between&lt;/code&gt; and &lt;code&gt;IgnoreCase&lt;/code&gt; query keywords, repeated &lt;code&gt;@RequestParam&lt;/code&gt;, catch-all route variables like &lt;code&gt;{*path}&lt;/code&gt;, inherited controller mappings, &lt;code&gt;CommandLineRunner&lt;/code&gt; and &lt;code&gt;ApplicationRunner&lt;/code&gt;, ready events, executor queue limits with a &lt;code&gt;TaskDecorator&lt;/code&gt;, tagged gauges and histograms, and header rewriting in &lt;code&gt;HttpProxy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;None of these is a headline. Together they decide whether a Spring controller moves over with no edits or with twenty.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/#backend-messaging" rel="noopener noreferrer"&gt;messaging&lt;/a&gt; and &lt;a href="https://www.codenameone.com/developer-guide/#backend-mail" rel="noopener noreferrer"&gt;mail&lt;/a&gt; chapters have the full configuration, server-sent events are in the web chapter, and record entities are in the ORM chapter under "Record entities." If you have a Spring service you'd like to move and something's missing, tell me which annotation.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Subscriptions, Paywalls and a Customer Center, and We Don't Take a Cut</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Sun, 22 Nov 2026 14:05:08 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/subscriptions-paywalls-and-a-customer-center-and-we-dont-take-a-cut-199a</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/subscriptions-paywalls-and-a-customer-center-and-we-dont-take-a-cut-199a</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffgv66f7xygp0teh38sbr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffgv66f7xygp0teh38sbr.jpg" alt="Subscriptions and paywalls without a revenue cut" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you sell subscriptions in an app, you already give Apple or Google up to 30%. The usual next step is a subscription platform, because store receipts are miserable to validate and a paywall you can't change without an app update is a paywall you'll never test. The best known of those platforms charge a percentage of your revenue on top of the store's. The more you earn, the more you pay them, for the same API calls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A percentage is the wrong price for this. Validating a receipt costs the same whether it's for a $2 app or a $200 plan, so a fee that grows with your revenue is a tax on success. In July we shipped &lt;a href="https://www.codenameone.com/blog/commerce-secrets-without-iap-tax/" rel="noopener noreferrer"&gt;Commerce&lt;/a&gt; as receipt validation and entitlements. This release adds offerings, remote paywalls, experiments, a customer center and invites, and keeps the rule that matters: the money goes from the store, or your own Stripe or Paddle account, straight to you. Codename One never touches the money, so there's no commission to take.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fog539w882pvnk6iphow8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fog539w882pvnk6iphow8.png" alt="The Commerce overview in the console" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  One question: does this user have access?
&lt;/h2&gt;

&lt;p&gt;Commerce is built around entitlements. An entitlement is an access right like &lt;code&gt;pro&lt;/code&gt; or &lt;code&gt;remove_ads&lt;/code&gt;, and you map store products to it in the console. Your code never asks about products:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;CommerceManager&lt;/span&gt; &lt;span class="n"&gt;cm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CommerceManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEntitled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"pro"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// unlock&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Offering&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getOfferings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCurrent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// network call&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="no"&gt;CN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;callSerially&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Paywall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A subscription bought on an iPhone unlocks the same account on Android, on the desktop and on the web. Access is decided by one rule, the latest expiry over the active grants measured against the service's clock, so a user who sets the phone's clock back doesn't get a free month.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBJW0FwcCBTdG9yZV0gLS0-IFZbQ29tbWVyY2Ugc2VydmljZTxici8-dmFsaWRhdGVzIHJlY2VpcHRzXQogICAgR1tHb29nbGUgUGxheV0gLS0-IFYKICAgIEFbQW1hem9uIEFwcHN0b3JlXSAtLT4gVgogICAgU1tZb3VyIFN0cmlwZSBvciBQYWRkbGVdIC0tPiBWCiAgICBWIC0tPiBFW0VudGl0bGVtZW50OiBwcm9dCiAgICBFIC0tPiBQW2lQaG9uZV0KICAgIEUgLS0-IERbQW5kcm9pZF0KICAgIEUgLS0-IFdbV2ViIGFuZCBkZXNrdG9wXQogICAgSSAtLiBtb25leSAuLT4gWVtZb3VdCiAgICBHIC0uIG1vbmV5IC4tPiBZCiAgICBBIC0uIG1vbmV5IC4tPiBZCiAgICBTIC0uIG1vbmV5IC4tPiBZ%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBJW0FwcCBTdG9yZV0gLS0-IFZbQ29tbWVyY2Ugc2VydmljZTxici8-dmFsaWRhdGVzIHJlY2VpcHRzXQogICAgR1tHb29nbGUgUGxheV0gLS0-IFYKICAgIEFbQW1hem9uIEFwcHN0b3JlXSAtLT4gVgogICAgU1tZb3VyIFN0cmlwZSBvciBQYWRkbGVdIC0tPiBWCiAgICBWIC0tPiBFW0VudGl0bGVtZW50OiBwcm9dCiAgICBFIC0tPiBQW2lQaG9uZV0KICAgIEUgLS0-IERbQW5kcm9pZF0KICAgIEUgLS0-IFdbV2ViIGFuZCBkZXNrdG9wXQogICAgSSAtLiBtb25leSAuLT4gWVtZb3VdCiAgICBHIC0uIG1vbmV5IC4tPiBZCiAgICBBIC0uIG1vbmV5IC4tPiBZCiAgICBTIC0uIG1vbmV5IC4tPiBZ%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="824" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The dotted lines are the point. The service sees receipts. It never sees a card number and nothing flows through us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five stores, one purchase call
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apple App Store&lt;/strong&gt;, on iOS and on the Mac App Store for native Mac builds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Play&lt;/strong&gt;, validated through Google's own server API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Appstore&lt;/strong&gt;, with one build hint. The build swaps the Play Billing Library for Amazon's SDK and drops the billing permission Amazon rejects. Your code doesn't change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stripe and Paddle&lt;/strong&gt; for the web and the desktop, where there's no store. A hosted checkout in your own account sells the same package.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;purchase(CommercePackage)&lt;/code&gt; does the right thing on each platform. Where there's a store it sells the store product. Where there isn't, and the package has a web price, it opens the checkout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Offering&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getOfferings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCurrent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAnnual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="no"&gt;CN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;callSerially&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;cm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;purchase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAnnual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Paywalls you change without a release
&lt;/h2&gt;

&lt;p&gt;Offerings are configured in the console: which packages you sell, which one is current, and placements for different screens. Targeting rules and experiments decide which offering a given customer gets, and they're evaluated on every &lt;code&gt;getOfferings&lt;/code&gt; call, so a change takes effect without an app update.&lt;/p&gt;

&lt;p&gt;Experiments assign variants by hashing the experiment id with the user id. The same customer sees the same variant on every device and after every restart, and nothing about the assignment is stored. The console reports impressions, purchases and the conversion rate for each variant.&lt;/p&gt;

&lt;p&gt;The built-in paywall is themed with UIIDs, like any other Codename One component. For more control there's a paywall document, a JSON description with strings per locale, colors and &lt;code&gt;{{price}}&lt;/code&gt; style templates, edited in the console with a live preview that uses the same &lt;code&gt;PaywallView&lt;/code&gt; class as the device.&lt;/p&gt;

&lt;h2&gt;
  
  
  A customer center, so users don't email you to cancel
&lt;/h2&gt;

&lt;p&gt;One call shows a form where the customer sees their subscriptions and acts on them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;CustomerCenter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You choose which paths it offers and in what order:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MANAGE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The store's subscription management, or the billing portal for a web subscription&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;RESTORE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Restores the store account's purchases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;REFUND&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Asks the store for a refund&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CANCEL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Asks why, shows a retention offer for that reason if you have one, then continues to the store&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SUPPORT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your support page or email&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The cancel path is where the money is. A customer who's leaving because it's too expensive can be offered a discount right there, and the reason is reported either way, so you learn why people leave instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Invites, referral rewards and virtual currency
&lt;/h2&gt;

&lt;p&gt;Users can invite friends, and purchases by invited users are tracked back to the person who invited them. A referral can grant an entitlement or currency, and by the time your code sees it the reward is already in effect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;CustomerInfo&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CommerceManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCustomerInfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ReferralReward&lt;/span&gt; &lt;span class="n"&gt;reward&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getReferralRewards&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;earned&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reward&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isCurrency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;reward&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAmount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;reward&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCurrencyCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;reward&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getEntitlementId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;Dialog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Thank you"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Your invite earned you "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;earned&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"OK"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;coins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCurrencyBalance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"coins"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Subscriber attributes, lifecycle webhooks, a REST API, revenue reports and export and import round out the list. Export matters: if you ever want to leave, your customer data leaves with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the service is down, users keep access
&lt;/h2&gt;

&lt;p&gt;Commerce is optional and fails soft. If commerce is off in the build, the device is offline or the service can't answer, the app falls back to the stored answer and the store's own receipts, so a paying user keeps what they paid for. Code that talks to the older &lt;code&gt;Purchase&lt;/code&gt; API directly keeps working unchanged.&lt;/p&gt;

&lt;p&gt;For server-authoritative validation you enter your own store credentials in the console: the App Store key, a Google service account, the Amazon shared secret and your Stripe or Paddle keys. They're your accounts. We validate against them, and the payouts never pass through anything we run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/#_commerce" rel="noopener noreferrer"&gt;Commerce chapter&lt;/a&gt; covers setup for each store, identity and account transfer, the paywall document format, experiments and the analytics events. If you're paying a percentage of your revenue for this today, run the numbers and tell me what you find.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Calendars, Gantt Charts and Booking Apps Without Writing a Calendar</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Sat, 21 Nov 2026 14:26:15 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/calendars-gantt-charts-and-booking-apps-without-writing-a-calendar-42ng</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/calendars-gantt-charts-and-booking-apps-without-writing-a-calendar-42ng</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F010lz92jdzw4y7xdeea6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F010lz92jdzw4y7xdeea6.jpg" alt="A scheduler week view and a Gantt chart" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yesterday I argued that &lt;a href="https://www.codenameone.com/blog/shopify-was-wrong-and-right-to-dump-react-native/" rel="noopener noreferrer"&gt;a framework should give you more than the OS does&lt;/a&gt;. Here's the test case. Nobody ships a calendar view you can fill with your own appointments, or a Gantt chart. Not iOS, not Android, not Flutter, not React Native, not Kotlin Multiplatform, not .NET MAUI. Every one of them leaves you with a date picker and a blank screen. If your app books haircuts, plans shifts or tracks a project, you write that screen yourself, once per platform if you went native, or you license a commercial component and pay for it every year. Codename One ships both, in the box, free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Codename One now ships a scheduler, a Gantt chart with resource leveling, and Material 3 date and time pickers. Codename One draws its own UI, so these are the same component, pixel for pixel, on iOS, Android, the desktop and the web, and they take their look from your CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvyzjsaa5cz4ehj5valkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvyzjsaa5cz4ehj5valkr.png" alt="A Gantt chart with the critical path highlighted" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A scheduler in ten lines
&lt;/h2&gt;

&lt;p&gt;The model and the UI are separate. &lt;code&gt;com.codename1.scheduling&lt;/code&gt; holds the data with no UI, so the same classes work in your server code. &lt;code&gt;com.codename1.ui.scheduler&lt;/code&gt; draws it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;ZoneId&lt;/span&gt; &lt;span class="n"&gt;zone&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ZoneId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;systemDefault&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TimeMath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;epochDay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;currentTimeMillis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;zone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;DefaultScheduleModel&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DefaultScheduleModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ScheduleItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"review"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Design review"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nc"&gt;TimeMath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;zone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TimeMath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;zone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDetail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Room 2"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;Scheduler&lt;/span&gt; &lt;span class="n"&gt;scheduler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Scheduler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;scheduler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Scheduler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;WEEK&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;Form&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Form&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Schedule"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BorderLayout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;BorderLayout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;CENTER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;scheduler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhiu8wwvyfz7h5a27glkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhiu8wwvyfz7h5a27glkj.png" alt="The scheduler in week view" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Scheduler.View&lt;/code&gt; gives you &lt;code&gt;DAY&lt;/code&gt;, &lt;code&gt;WORK_WEEK&lt;/code&gt;, &lt;code&gt;WEEK&lt;/code&gt;, &lt;code&gt;MONTH&lt;/code&gt;, &lt;code&gt;AGENDA&lt;/code&gt; and &lt;code&gt;RESOURCE_DAY&lt;/code&gt;, and there's a resource timeline for "who's busy when" screens. Items can be dragged and resized with snapping (&lt;code&gt;setSnapMinutes&lt;/code&gt;), the working hours come from a &lt;code&gt;WorkCalendar&lt;/code&gt;, and &lt;code&gt;setZone&lt;/code&gt; lets a clinic in Berlin see the schedule in Berlin time while the phone is in Lisbon.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-month.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-month.png" alt="The scheduler month view" width="409" height="919"&gt;&lt;/a&gt;Month.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-resource-day.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-resource-day.png" alt="The scheduler showing a day per resource" width="409" height="919"&gt;&lt;/a&gt;A day per resource.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-day-dark.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-day-dark.png" alt="The scheduler day view in dark mode" width="409" height="919"&gt;&lt;/a&gt;Dark mode.&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A Gantt chart that knows who's doing the work
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Gantt&lt;/code&gt; component reads a &lt;code&gt;ProjectModel&lt;/code&gt;: tasks with durations, dependencies between them and the people assigned to them. It draws bars you can drag, dependencies you can link by dragging from one bar to another, a baseline to compare against, collapsible groups and the critical path, which is the chain of tasks where any delay moves the end date.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdoazrrxt1k0ef38z9hsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdoazrrxt1k0ef38z9hsy.png" alt="A leveled plan with the load per person" width="409" height="919"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The part I'm proudest of is resource leveling. A plan that looks fine on paper often has the same developer on two tasks in the same week. &lt;code&gt;ResourceLeveler&lt;/code&gt; finds those overallocations and proposes a fix, and you decide whether to apply it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;WorkCalendar&lt;/span&gt; &lt;span class="n"&gt;calendar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WorkCalendar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;ProjectModel&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ProjectModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;currentTimeMillis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addResource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ScheduleResource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Developer"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GanttTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"API"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMillisPerDay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GanttTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"screens"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Screens"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMillisPerDay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nc"&gt;ResourceLeveler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findOverallocations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;LevelingResult&lt;/span&gt; &lt;span class="n"&gt;proposal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ResourceLeveler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;slip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getFinishAfter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getFinishBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isChanged&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nc"&gt;Dialog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Level resources"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getChangedTasks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;" tasks move; the project ends "&lt;/span&gt;
                    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;slip&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nc"&gt;TimeMath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;DAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;" days later."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Apply"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Cancel"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proposal tells you which tasks move and how much later the project ends, before anything changes. The load histogram under the chart shows the result: no more stacked bars for one person.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBQW1Byb2plY3RNb2RlbDxici8-dGFza3MsIGxpbmtzLCBwZW9wbGVdIC0tPiBTW1Byb2plY3RTY2hlZHVsZXI8YnIvPmRhdGVzIGZyb20gd29yayBjYWxlbmRhcl0KICAgIFMgLS0-IE97UmVzb3VyY2VMZXZlbGVyPGJyLz5vdmVyYWxsb2NhdGVkP30KICAgIE8gLS0-fG5vfCBHW0dhbnR0IGRyYXdzIGl0XQogICAgTyAtLT58eWVzfCBMW0xldmVsaW5nUmVzdWx0PGJyLz53aGF0IG1vdmVzLCBuZXcgZW5kIGRhdGVdCiAgICBMIC0tPnx1c2VyIGFwcGxpZXN8IEc%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBQW1Byb2plY3RNb2RlbDxici8-dGFza3MsIGxpbmtzLCBwZW9wbGVdIC0tPiBTW1Byb2plY3RTY2hlZHVsZXI8YnIvPmRhdGVzIGZyb20gd29yayBjYWxlbmRhcl0KICAgIFMgLS0-IE97UmVzb3VyY2VMZXZlbGVyPGJyLz5vdmVyYWxsb2NhdGVkP30KICAgIE8gLS0-fG5vfCBHW0dhbnR0IGRyYXdzIGl0XQogICAgTyAtLT58eWVzfCBMW0xldmVsaW5nUmVzdWx0PGJyLz53aGF0IG1vdmVzLCBuZXcgZW5kIGRhdGVdCiAgICBMIC0tPnx1c2VyIGFwcGxpZXN8IEc%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="1176" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-baseline.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-baseline.png" alt="A Gantt chart with baseline bars" width="800" height="356"&gt;&lt;/a&gt;Against the baseline.&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Material 3 pickers, styled your way
&lt;/h2&gt;

&lt;p&gt;The date, time and date and time pickers now come as Material 3 dialogs: a month grid with a year list and a field to type the date, and a clock dial with a keyboard mode. Apps on the Android Material native theme get them with no code. Any other theme asks for them with one constant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nn"&gt;#Constants&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;pickerStyle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"material"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Existing &lt;code&gt;Picker&lt;/code&gt; code doesn't change. Branding them is a few rules on the &lt;code&gt;PickerMaterial&lt;/code&gt; UIIDs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;PickerMaterialDay&lt;/span&gt;&lt;span class="nc"&gt;.selected&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#0f766e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;PickerMaterialDial&lt;/span&gt;&lt;span class="nc"&gt;.selected&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#0f766e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-date.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-date.png" alt="The Material 3 date picker" width="409" height="457"&gt;&lt;/a&gt;The date picker.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-time.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-time.png" alt="The Material 3 time picker clock dial" width="409" height="462"&gt;&lt;/a&gt;The clock dial.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-date-css.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-date-css.png" alt="The date picker restyled with teal CSS rules" width="409" height="457"&gt;&lt;/a&gt;Restyled in CSS.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-time-dark.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-time-dark.png" alt="The time picker in dark mode" width="409" height="462"&gt;&lt;/a&gt;Dark mode.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;This is the lightweight argument in one picture. A native date picker looks the way Apple or Google decided it looks this year. These look the way you decide, on every device, and a field that needs the platform's own dialog can still ask for it with &lt;code&gt;setUseLightweightPopup(false)&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Slate: a booking app you can ship
&lt;/h2&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/slate-desktop-demo.mp4" rel="noopener noreferrer"&gt;Download the desktop video&lt;/a&gt;.

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/slate-owner-demo.mp4" rel="noopener noreferrer"&gt;Download the owner video&lt;/a&gt;.

&lt;p&gt;Slate is our new full-stack template: an appointment booking app and its server, in one Maven project. Salons, clinics, tutors, personal trainers: anyone who sells time. Generate it from the &lt;a href="https://www.codenameone.com/initializr/" rel="noopener noreferrer"&gt;Initializr&lt;/a&gt; under your own name and package. The source is MIT-0, so you owe nothing and credit nobody.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-book-slots.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1732" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-book-slots.png" alt="Slate showing free times for a service"&gt;&lt;/a&gt;Free times.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-book-confirm.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1422" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-book-confirm.png" alt="Slate confirming a booking with a deposit"&gt;&lt;/a&gt;Confirm, with a deposit.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-provider-week.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1422" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-provider-week.png" alt="A provider's week in Slate"&gt;&lt;/a&gt;The provider's week.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-owner-staffing.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1422" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-owner-staffing.png" alt="The owner's staffing plan as a Gantt chart, with each provider's load under it"&gt;&lt;/a&gt;The week's staffing, as a Gantt chart.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-owner-preview.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1422" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-owner-preview.png" alt="The owner previewing booking rules on a real day"&gt;&lt;/a&gt;Rules, previewed on a real day.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;It has three roles, and the server decides which screens an account sees:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clients&lt;/strong&gt; see free times by day or week, with times that clash with their own phone calendar marked. A hold keeps the slot while they book, they can pay a deposit, and the booking lands in their calendar with a reminder that moves if they reschedule. There's a waitlist for full days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Providers&lt;/strong&gt; manage hours and time off, mark appointments complete or no-show, and sync their calendars from the phone, Google, Microsoft or an ICS address. Event titles never leave the device; Slate only needs to know when they're busy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Owners&lt;/strong&gt; get a dashboard, a board for the day, a staffing plan for the week, the service catalog and booking rules they can preview on a real day before saving them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hard part of a booking product is the slot engine, and that's where most of Slate's server lives. It weighs providers, rooms, buffers between appointments, travel time, gap rules and the client's own calendar together, and the hold prevents two clients from getting the same slot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fst45ayo5cbfl4atpvxon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fst45ayo5cbfl4atpvxon.png" alt="Slate's owner dashboard on the desktop" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It runs on iOS, Android, the desktop and the web, and the backend runs on SQLite, PostgreSQL, MySQL, or MariaDB.&lt;/p&gt;

&lt;h3&gt;
  
  
  Slate runs on the scheduler and the Gantt chart
&lt;/h3&gt;

&lt;p&gt;Slate's calendar screens are the components in this post. The provider's day and week are &lt;code&gt;Scheduler&lt;/code&gt; views, and the owner's day board is the &lt;code&gt;RESOURCE_DAY&lt;/code&gt; view with a column per provider. The owner's staffing plan is a &lt;code&gt;Gantt&lt;/code&gt; chart: a row per provider, a bar per shift filled as far as it's booked, and the resource load under it showing who has room this week. The &lt;a href="https://www.codenameone.com/slate/" rel="noopener noreferrer"&gt;implementor's guide&lt;/a&gt; walks through how a week of schedules becomes a project model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/#scheduling-and-gantt" rel="noopener noreferrer"&gt;Scheduling and Gantt charts chapter&lt;/a&gt; covers every view, renderer, listener and CSS hook, including printing with &lt;code&gt;SchedulePrinter&lt;/code&gt;. The pickers are under "Material date and time pickers" in the components chapter, and Slate has a &lt;a href="https://www.codenameone.com/slate/" rel="noopener noreferrer"&gt;user's guide and an implementor's guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you build planning or booking software, I'd like to know which view you need that isn't there yet.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Shopify Was Wrong and Right to Dump React Native</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Fri, 20 Nov 2026 14:01:06 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/shopify-was-wrong-and-right-to-dump-react-native-2c93</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/shopify-was-wrong-and-right-to-dump-react-native-2c93</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rhy2ar577sbr10464ct.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rhy2ar577sbr10464ct.jpg" alt="Shopify was wrong and right to dump React Native" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In September Shopify announced it's &lt;a href="https://shopify.engineering/back-to-native" rel="noopener noreferrer"&gt;moving every mobile app off React Native&lt;/a&gt; and rewriting them in Swift and Kotlin. Their reasoning fits in one sentence from the post: "building the same feature in Swift and Kotlin no longer carries the cost it used to." Agents write the second copy, so why share code at all?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;React Native deserved to die. It's a heavyweight toolkit, and every heavyweight toolkit, from AWT to Xamarin.Forms, was eventually replaced by a lightweight one or by native code. Replacing it with two native codebases is wrong, because it takes the most expensive part of React Native, a separate platform per target, and doubles it. Code was never the cost. Platforms, testing and store churn are, and AI makes every one of them worse.&lt;/p&gt;

&lt;p&gt;This isn't a post against AI. I use LLMs every day, and in the right setting they're superb. But they can't hold a Samsung phone, they don't know what Apple will announce next June, and they can't sign off on a release. Shopify's plan needs them to do all three.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React Native was designed to fail at the one thing you adopted it for.&lt;/strong&gt; Its creators rejected write once, run anywhere in the launch announcement. In writing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your buttons belong to Samsung.&lt;/strong&gt; Heavyweight toolkits hand your UI to the OS and the vendor skin, which is why Samsung's keyboard can hang your text field.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not looking 100% native is a feature, and here's why.&lt;/strong&gt; Lightweight toolkits ship the pixels you tested, and still embed a native map or web view when you need one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shopify's own post explains why its plan fails.&lt;/strong&gt; Agents write code in seconds and need minutes to test it. Two codebases double the slow part.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"iOS and Android" is a lie.&lt;/strong&gt; The web, the desktop, tablets, foldables, the watch, the car, TVs, consoles and embedded devices are all platforms too, and your developers end up as meat proxies between users and an LLM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meta gave up on a native WhatsApp desktop app. You have fewer engineers than Meta.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing is the real bill, and AI makes it bigger.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Apple broke apps with UIScene. Ours didn't notice.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A framework should beat the OS, not wrap it.&lt;/strong&gt; Gantt charts, commerce with no commission, records as entities, every protection a bank app needs, built once, and a Base64 encoder nearly three times faster than Apple's.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One codebase pays double when it includes the server.&lt;/strong&gt; Plus my generous offer of a PHP port.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Coming This Week
&lt;/h2&gt;

&lt;p&gt;Before we proceed, here's a preview of this week on the blog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Saturday, November 14:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/scheduler-gantt-and-material-pickers/" rel="noopener noreferrer"&gt;Calendars, Gantt Charts and Booking Apps Without Writing a Calendar&lt;/a&gt;. A scheduler, a Gantt chart with critical paths and resource leveling, Material 3 pickers and Slate, our appointment booking template.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sunday, November 15:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/subscriptions-and-paywalls-without-a-revenue-cut/" rel="noopener noreferrer"&gt;Subscriptions, Paywalls and a Customer Center, and We Don't Take a Cut&lt;/a&gt;. Offerings, experiments, refunds and invites across five stores.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monday, November 16:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/kafka-mail-and-records-in-your-java-backend/" rel="noopener noreferrer"&gt;Kafka Listeners, Mail and Live Streams in Your Backend, With Records as Entities&lt;/a&gt;. Spring-style messaging, transactional email, server-sent events, and an ORM that's ahead of JPA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tuesday, November 17:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/ship-your-java-game-on-steam/" rel="noopener noreferrer"&gt;Ship Your Game on Steam, and Why the Art Matters More Than the Engine&lt;/a&gt;. Splat, a team paintball shooter, and the lesson it taught us.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wednesday, November 18:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/windows-kiosks-and-command-line-apps/" rel="noopener noreferrer"&gt;Windows Kiosks and Command Line Tools, Built From Java&lt;/a&gt;. Windows IoT Enterprise as a target, and a console API for real terminal tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thursday, November 19:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/run-an-llm-on-the-phone/" rel="noopener noreferrer"&gt;Run an LLM and Whisper on the Phone, With No Server Bill&lt;/a&gt;. Local models through the same API as the cloud ones, so moving a feature onto the phone is a one line change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://www.codenameone.com/blog/scheduler-gantt-and-material-pickers/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-critical-path.png" alt="A Gantt chart with the critical path highlighted" width="800" height="356"&gt;&lt;/a&gt;Gantt with the critical path.&lt;br&gt;
&lt;a href="https://www.codenameone.com/blog/scheduler-gantt-and-material-pickers/" rel="noopener noreferrer"&gt;&lt;img width="800" height="1732" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fslate-book-slots.png" alt="Slate showing free appointment times"&gt;&lt;/a&gt;Booking in Slate.&lt;br&gt;
&lt;a href="https://www.codenameone.com/blog/ship-your-java-game-on-steam/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fblog%2Frelease-2026-11-13%2Fsplat-in-game.jpg" alt="A first-person view of a Splat capture the flag match" width="800" height="470"&gt;&lt;/a&gt;Splat, in a match.&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React Native was built to fail at write once, run anywhere
&lt;/h2&gt;

&lt;p&gt;Nobody should be surprised that React Native didn't deliver one codebase. It never tried. When Facebook &lt;a href="https://legacy.reactjs.org/blog/2015/03/26/introducing-react-native.html" rel="noopener noreferrer"&gt;announced it in 2015&lt;/a&gt; they wrote: "we're not chasing 'write once, run anywhere.'" They rejected it on purpose, and built a toolkit where platform code is part of the design. Then a decade of teams adopted it believing they'd get one codebase, and spent that decade writing platform code.&lt;/p&gt;

&lt;p&gt;The reason is architectural. React Native is a &lt;strong&gt;heavyweight&lt;/strong&gt; UI toolkit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Heavyweight and lightweight
&lt;/h3&gt;

&lt;p&gt;UI toolkits come in two families, and the split is older than smartphones.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;heavyweight&lt;/strong&gt; toolkit maps each of your components to a widget the operating system owns. Your button is a &lt;code&gt;UIButton&lt;/code&gt; on iOS and an &lt;code&gt;android.widget.Button&lt;/code&gt; on Android. Java's AWT worked this way in 1995. So did SWT. Xamarin.Forms, .NET MAUI and React Native repeat it today.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;lightweight&lt;/strong&gt; toolkit asks the OS for a surface and draws every pixel itself. Swing replaced AWT this way. Qt, Flutter and Codename One all draw their own UI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IFRCCiAgICBzdWJncmFwaCBIW0hlYXZ5d2VpZ2h0OiBSZWFjdCBOYXRpdmUsIE1BVUksIEFXVCwgU1dUXQogICAgICAgIEExW1lvdXIgY29tcG9uZW50XSAtLT58YnJpZGdlIHBlciB3aWRnZXR8IEIxW1VJQnV0dG9uIG9uIGlPU10KICAgICAgICBBMSAtLT58YnJpZGdlIHBlciB3aWRnZXR8IEMxW2FuZHJvaWQud2lkZ2V0LkJ1dHRvbl0KICAgICAgICBCMSAtLT4gRDFbQmVoYXZpb3IgYW5kIGxvb2sgb3duZWQgYnkgQXBwbGVdCiAgICAgICAgQzEgLS0-IEUxW0JlaGF2aW9yIGFuZCBsb29rIG93bmVkIGJ5IEdvb2dsZTxici8-YW5kIFNhbXN1bmcsIFhpYW9taSBhbmQgSHVhd2VpXQogICAgZW5kCiAgICBzdWJncmFwaCBMW0xpZ2h0d2VpZ2h0OiBDb2RlbmFtZSBPbmUsIEZsdXR0ZXIsIFN3aW5nLCBRdF0KICAgICAgICBBMltZb3VyIGNvbXBvbmVudF0gLS0-IFAyW1lvdXIgcmVuZGVyaW5nIGNvZGU8YnIvPmNvbXBpbGVkIGludG8geW91ciBhcHBdCiAgICAgICAgUDIgLS0-IFMyW09uZSBzdXJmYWNlIGZyb20gdGhlIE9TXQogICAgZW5k%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IFRCCiAgICBzdWJncmFwaCBIW0hlYXZ5d2VpZ2h0OiBSZWFjdCBOYXRpdmUsIE1BVUksIEFXVCwgU1dUXQogICAgICAgIEExW1lvdXIgY29tcG9uZW50XSAtLT58YnJpZGdlIHBlciB3aWRnZXR8IEIxW1VJQnV0dG9uIG9uIGlPU10KICAgICAgICBBMSAtLT58YnJpZGdlIHBlciB3aWRnZXR8IEMxW2FuZHJvaWQud2lkZ2V0LkJ1dHRvbl0KICAgICAgICBCMSAtLT4gRDFbQmVoYXZpb3IgYW5kIGxvb2sgb3duZWQgYnkgQXBwbGVdCiAgICAgICAgQzEgLS0-IEUxW0JlaGF2aW9yIGFuZCBsb29rIG93bmVkIGJ5IEdvb2dsZTxici8-YW5kIFNhbXN1bmcsIFhpYW9taSBhbmQgSHVhd2VpXQogICAgZW5kCiAgICBzdWJncmFwaCBMW0xpZ2h0d2VpZ2h0OiBDb2RlbmFtZSBPbmUsIEZsdXR0ZXIsIFN3aW5nLCBRdF0KICAgICAgICBBMltZb3VyIGNvbXBvbmVudF0gLS0-IFAyW1lvdXIgcmVuZGVyaW5nIGNvZGU8YnIvPmNvbXBpbGVkIGludG8geW91ciBhcHBdCiAgICAgICAgUDIgLS0-IFMyW09uZSBzdXJmYWNlIGZyb20gdGhlIE9TXQogICAgZW5k%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="831" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Heavyweight has exactly one selling point: the widgets are the platform's, so they look the part for free. Everything else is a bill.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Many implementations of every widget.&lt;/strong&gt; A text field on Android and a text field on iOS are different programs with different bugs, and it doesn't stop at two. Apple alone made everyone move from &lt;code&gt;UIWebView&lt;/code&gt; to &lt;code&gt;WKWebView&lt;/code&gt;, with different APIs and different behavior, and Android has gone through several generations of its own widgets. Each new target multiplies it again: a TV, a watch or a desktop brings its own set. The abstraction exposes only what all of them agree on, so anything interesting drops to platform code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A bridge on every interaction.&lt;/strong&gt; Layout, events and state cross from your code into the widget and back, on every frame.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavior you can't test in one place.&lt;/strong&gt; The widget runs inside the OS, so it behaves according to the OS version, the vendor skin and whatever keyboard the user installed. A font that's a pixel taller on one vendor's build clips the bottom of your label. A minor OS update on one device family delivers focus and text events in a slightly different order, and a race that never happened before starts corrupting input on those phones only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one is where the money burns. A controlled &lt;code&gt;TextInput&lt;/code&gt; &lt;a href="https://github.com/facebook/react-native/issues/35590" rel="noopener noreferrer"&gt;hangs on Samsung phones when the Samsung keyboard's Grammarly integration is on&lt;/a&gt;. Setting state on a controlled &lt;code&gt;TextInput&lt;/code&gt; &lt;a href="https://github.com/facebook/react-native/issues/20361" rel="noopener noreferrer"&gt;can duplicate its value&lt;/a&gt;. These are races between JavaScript, the bridge and a keyboard Samsung ships. You find them when a user with that phone and that keyboard complains, and you can't reproduce them on anything else.&lt;/p&gt;

&lt;p&gt;Then the OS moves under you. When Apple shipped Liquid Glass, every app built with the new SDK got the redesigned system controls whether the team wanted them or not. Apple's escape hatch, the &lt;code&gt;UIDesignRequiresCompatibility&lt;/code&gt; key, comes with a promise that it will be removed. And you have to know that key exists. Nobody tells you. With a heavyweight UI you don't just work for your boss. You work for Apple and Google too, reading their release notes and following their instructions every year to keep your own app looking like your own app.&lt;/p&gt;

&lt;p&gt;Shopify's own numbers show what that bridge cost them. &lt;a href="https://www.infoq.com/news/2026/09/shopify-drops-react-native/" rel="noopener noreferrer"&gt;InfoQ reports&lt;/a&gt; cold start dropped 23% on iOS and 50% on Android after the rewrite, and crash-free sessions went from 99.5% to 99.95%. Those numbers are the price of heavyweight, finally itemized.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lightweight is the architecture that works
&lt;/h3&gt;

&lt;p&gt;A lightweight toolkit compiles the UI into your app. The pixels you tested are the pixels that ship, on every phone and every OS version, next year as well as today.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One implementation of each component.&lt;/strong&gt; A bug fixed once is fixed everywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No bridge.&lt;/strong&gt; Drawing your own button needs no round trip into the OS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic rendering.&lt;/strong&gt; A screenshot test on a CI runner means something. Codename One's CI compares hundreds of screenshots on every commit across iOS, Android, desktop and the web.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stability.&lt;/strong&gt; An OS update can't restyle your app. A buggy vendor skin draws your app the way it draws any other surface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native where you want it.&lt;/strong&gt; A lightweight UI can still mix in any native component as a peer. Google Maps, a platform web view, a camera preview, a payment sheet or a third party SDK's widget sits inside your layout like any other component. You choose native per component, instead of inheriting it for everything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;"It doesn't look 100% native." Correct. That's a feature. It's my app, not Apple's. Our &lt;a href="https://www.codenameone.com/blog/scheduler-gantt-and-material-pickers/" rel="noopener noreferrer"&gt;Material 3 date picker&lt;/a&gt; is better than most native pickers I've used, and when I want it different I change CSS instead of waiting a year for a vendor to add a parameter.&lt;/p&gt;

&lt;p&gt;Accessibility is the real question for any lightweight toolkit, because the OS can't read a button it didn't draw. A lightweight toolkit has to publish its components to VoiceOver and TalkBack itself. Codename One does, and &lt;a href="https://www.codenameone.com/blog/ios-density-scroll-and-accessibility/" rel="noopener noreferrer"&gt;keeps improving it&lt;/a&gt;. Ask every lightweight framework how it handles this. The answer separates the serious ones from the rest.&lt;/p&gt;

&lt;p&gt;That last point deserves emphasis, because it's the answer to every "but I need the real thing" objection. In Codename One a &lt;code&gt;PeerComponent&lt;/code&gt; places a native view inside the lightweight UI: Google Maps, an ad network's banner, a vendor's video player or chat widget, anything with a native view. It lays out, scrolls and layers with the surrounding components. Native becomes the escape hatch for the few components that need it. Heavyweight gets this backwards: native is the default, and consistency is what you claw back.&lt;/p&gt;

&lt;p&gt;The old joke about Java was "write once, debug everywhere." It was coined when Java's UI was AWT, a heavyweight toolkit, and that's exactly what it described. Swing fixed it. The joke still describes every heavyweight toolkit: you pay for a platform per target, test per target, debug per target, and still have an abstraction in the way. Shopify paid native costs for a decade and got none of native's control. Now it will pay them twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two codebases is the same mistake, twice
&lt;/h2&gt;

&lt;p&gt;Shopify's own post explains why their cure fails:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Agents can make code changes in seconds, but it takes them several minutes to test the output."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Writing code was never the expensive part, and AI made that obvious. Everything after the code is the cost, and a second codebase doubles all of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  There are no "two platforms"
&lt;/h3&gt;

&lt;p&gt;"iOS and Android" is a fiction. Start with the big ones: the web and the desktop, which the next section covers. Then the iPad, Android tablets and foldables, which need layouts that adapt instead of a stretched phone UI. A serious commerce app is also expected on the watch, in widgets, in Siri and in the car. Each is a platform with its own lifecycle and its own review rules, and each needs its own code in a native project.&lt;/p&gt;

&lt;p&gt;Then there's everything beyond the phone, where the interesting products are being built: &lt;a href="https://www.codenameone.com/blog/apple-tv-and-android-tv/" rel="noopener noreferrer"&gt;TVs&lt;/a&gt;, &lt;a href="https://www.codenameone.com/blog/codename-one-on-xbox/" rel="noopener noreferrer"&gt;consoles&lt;/a&gt;, &lt;a href="https://www.codenameone.com/blog/embedded-linux-ui-in-18-mb/" rel="noopener noreferrer"&gt;embedded devices and kiosks&lt;/a&gt;, &lt;a href="https://www.codenameone.com/blog/ar-vr-support-simulation/" rel="noopener noreferrer"&gt;AR and VR&lt;/a&gt;, and real-time systems on a factory floor. Two native mobile codebases reach none of them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBJW2lPU10gLS0-IFdbd2F0Y2hPU10KICAgIEkgLS0-IENQW0NhclBsYXldCiAgICBJIC0tPiBIS1tIZWFsdGhLaXRdCiAgICBJIC0tPiBXR1tXaWRnZXRzIGFuZCBMaXZlIEFjdGl2aXRpZXNdCiAgICBJIC0tPiBNQ1tNYWMgQ2F0YWx5c3RdCiAgICBJIC0tPiBJUFtpUGFkLCBzcGxpdCB2aWV3XQogICAgQVtBbmRyb2lkXSAtLT4gV09bV2VhciBPU10KICAgIEEgLS0-IEFBW0FuZHJvaWQgQXV0b10KICAgIEEgLS0-IEhDW0hlYWx0aCBDb25uZWN0XQogICAgQSAtLT4gR09bR3JhcGhlbmVPUywgTGluZWFnZU9TLCAvZS9PUzxici8-bm8gR29vZ2xlIFBsYXkgU2VydmljZXNdCiAgICBBIC0tPiBBTVtBbWF6b24gRmlyZV0KICAgIEEgLS0-IEZEW1RhYmxldHMgYW5kIGZvbGRhYmxlc10KICAgIEEgLS0-IENOW0NoaW5lc2UgYXBwIHN0b3Jlczxici8-bm8gR29vZ2xlIGF0IGFsbF0KICAgIE9bQmV5b25kIG1vYmlsZV0gLS0-IFdFQltXZWJdCiAgICBPIC0tPiBEVFtXaW5kb3dzLCBtYWNPUywgTGludXhdCiAgICBPIC0tPiBUVltUVnMgYW5kIGNvbnNvbGVzXQogICAgTyAtLT4gRU1bRW1iZWRkZWQgYW5kIGtpb3Nrc10KICAgIE8gLS0-IFZSW0FSIGFuZCBWUl0%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBJW2lPU10gLS0-IFdbd2F0Y2hPU10KICAgIEkgLS0-IENQW0NhclBsYXldCiAgICBJIC0tPiBIS1tIZWFsdGhLaXRdCiAgICBJIC0tPiBXR1tXaWRnZXRzIGFuZCBMaXZlIEFjdGl2aXRpZXNdCiAgICBJIC0tPiBNQ1tNYWMgQ2F0YWx5c3RdCiAgICBJIC0tPiBJUFtpUGFkLCBzcGxpdCB2aWV3XQogICAgQVtBbmRyb2lkXSAtLT4gV09bV2VhciBPU10KICAgIEEgLS0-IEFBW0FuZHJvaWQgQXV0b10KICAgIEEgLS0-IEhDW0hlYWx0aCBDb25uZWN0XQogICAgQSAtLT4gR09bR3JhcGhlbmVPUywgTGluZWFnZU9TLCAvZS9PUzxici8-bm8gR29vZ2xlIFBsYXkgU2VydmljZXNdCiAgICBBIC0tPiBBTVtBbWF6b24gRmlyZV0KICAgIEEgLS0-IEZEW1RhYmxldHMgYW5kIGZvbGRhYmxlc10KICAgIEEgLS0-IENOW0NoaW5lc2UgYXBwIHN0b3Jlczxici8-bm8gR29vZ2xlIGF0IGFsbF0KICAgIE9bQmV5b25kIG1vYmlsZV0gLS0-IFdFQltXZWJdCiAgICBPIC0tPiBEVFtXaW5kb3dzLCBtYWNPUywgTGludXhdCiAgICBPIC0tPiBUVltUVnMgYW5kIGNvbnNvbGVzXQogICAgTyAtLT4gRU1bRW1iZWRkZWQgYW5kIGtpb3Nrc10KICAgIE8gLS0-IFZSW0FSIGFuZCBWUl0%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="400" height="1824"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every box has rules a model has to know and keep current. A GrapheneOS user reports that sign-in fails. Someone has to know that Google Play Services aren't there, find the library that assumed they were, test the fix on a phone they don't own, and feed all of it back to the agent. The agent writes the patch. The developer becomes a meat proxy between users and an LLM, and with two codebases they do it twice.&lt;/p&gt;

&lt;p&gt;Skipping the niche platforms is a mistake too. People on GrapheneOS, a Linux desktop or an Amazon tablet have few choices. Show up for them early and they remember, and they tell everyone. They're the early adopters who carry a product across the chasm, and the chasm is where products die. That's why we &lt;a href="https://www.codenameone.com/blog/android-apps-everywhere-even-without-google/" rel="noopener noreferrer"&gt;support de-Googled Android officially&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The web and the desktop are the product now
&lt;/h3&gt;

&lt;p&gt;WhatsApp belongs to Meta, one of the largest engineering organizations on earth. For years WhatsApp Web needed your phone online, because it was a mirror of the phone app. In 2025 Meta replaced the native Windows client with a wrapped web version. Meta couldn't keep a desktop client in step with its phone apps. Two native codebases won't either.&lt;/p&gt;

&lt;p&gt;Picture a competitor with one codebase. They finish a feature and it ships on the phone, the tablet, the desktop, the web and the watch that same day. You finished the same feature in Swift, and you're still waiting for the Kotlin version, and when it lands it doesn't behave quite like the Swift one. The desktop and the web haven't started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing is the bill
&lt;/h3&gt;

&lt;p&gt;Shopify describes its review process for each change in the rewrite: tests, a visual comparison against the running app, two adversarial AI reviewers and a human approval. Per platform. Two codebases mean two test suites, two sets of screenshot baselines, two device farms and two release trains, and every native widget adds behavior only a physical device can verify.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBGW09uZSBmZWF0dXJlXSAtLT4gU1tTd2lmdCBjb2RlXQogICAgRiAtLT4gS1tLb3RsaW4gY29kZV0KICAgIFMgLS0-IFRTW2lPUyB0ZXN0cywgZGV2aWNlIGZhcm0sPGJyLz5zY3JlZW5zaG90cywgcmV2aWV3XQogICAgSyAtLT4gVEtbQW5kcm9pZCB0ZXN0cywgZGV2aWNlIGZhcm0sPGJyLz5zY3JlZW5zaG90cywgcmV2aWV3XQogICAgVFMgLS0-IFIxW0FwcCBTdG9yZSByZXZpZXddCiAgICBUSyAtLT4gUjJbUGxheSByZXZpZXddCiAgICBGMltPbmUgZmVhdHVyZV0gLS0-IENbQ29kZW5hbWUgT25lIGNvZGVdCiAgICBDIC0tPiBUW09uZSB0ZXN0IHN1aXRlLCBvbmUgc2V0IG9mPGJyLz5zY3JlZW5zaG90IGJhc2VsaW5lc10KICAgIFQgLS0-IEJbQnVpbGRzIGZvciBpT1MsIEFuZHJvaWQsPGJyLz5kZXNrdG9wLCB3ZWIsIHdhdGNoXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBGW09uZSBmZWF0dXJlXSAtLT4gU1tTd2lmdCBjb2RlXQogICAgRiAtLT4gS1tLb3RsaW4gY29kZV0KICAgIFMgLS0-IFRTW2lPUyB0ZXN0cywgZGV2aWNlIGZhcm0sPGJyLz5zY3JlZW5zaG90cywgcmV2aWV3XQogICAgSyAtLT4gVEtbQW5kcm9pZCB0ZXN0cywgZGV2aWNlIGZhcm0sPGJyLz5zY3JlZW5zaG90cywgcmV2aWV3XQogICAgVFMgLS0-IFIxW0FwcCBTdG9yZSByZXZpZXddCiAgICBUSyAtLT4gUjJbUGxheSByZXZpZXddCiAgICBGMltPbmUgZmVhdHVyZV0gLS0-IENbQ29kZW5hbWUgT25lIGNvZGVdCiAgICBDIC0tPiBUW09uZSB0ZXN0IHN1aXRlLCBvbmUgc2V0IG9mPGJyLz5zY3JlZW5zaG90IGJhc2VsaW5lc10KICAgIFQgLS0-IEJbQnVpbGRzIGZvciBpT1MsIEFuZHJvaWQsPGJyLz5kZXNrdG9wLCB3ZWIsIHdhdGNoXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="744" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agents make the top half worse, not better. They produce more code per day, and every line of it lands in two pipelines that need devices and humans to sign off. The throughput limit was never typing. It's verification, and Shopify chose to verify everything twice.&lt;/p&gt;

&lt;h3&gt;
  
  
  The stores change the rules every year
&lt;/h3&gt;

&lt;p&gt;The App Store and Play are where mobile projects lose weeks. Apple made UIScene lifecycle support mandatory and broke third-party plugins that hooked the app delegate. Codename One users got it as a build default: we &lt;a href="https://www.codenameone.com/blog/uiscene-on-by-default-ios-performance/" rel="noopener noreferrer"&gt;turned &lt;code&gt;ios.uiscene=true&lt;/code&gt; on by default&lt;/a&gt; after a month of testing, and nobody noticed. Same with the Xcode 26 migration, Google Play's 16 KB page requirement and every new target API level.&lt;/p&gt;

&lt;p&gt;LLMs are trained on the past. Store requirements are announced for the future. The model writing your Swift today doesn't know next spring's privacy rule. A framework team that tracks those changes full-time and fixes them once for everyone matters more in the agent era.&lt;/p&gt;

&lt;h2&gt;
  
  
  A platform should give you more than the OS
&lt;/h2&gt;

&lt;p&gt;A framework that wraps the OS hands you the lowest common denominator. A lightweight framework can ship what the OS doesn't have at all. Most of this week's release is exactly that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A &lt;a href="https://www.codenameone.com/blog/scheduler-gantt-and-material-pickers/" rel="noopener noreferrer"&gt;scheduler and a Gantt chart&lt;/a&gt; with resource leveling&lt;/strong&gt;, plus Material 3 date and time pickers. Neither iOS nor Android ships a Gantt chart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.codenameone.com/blog/subscriptions-and-paywalls-without-a-revenue-cut/" rel="noopener noreferrer"&gt;Subscriptions, paywalls and a customer center&lt;/a&gt;&lt;/strong&gt; across Apple, Google, Amazon, Stripe and Paddle. We never touch your money, so there's no commission.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.codenameone.com/blog/bastion-hardened-bank-template/" rel="noopener noreferrer"&gt;Crypto wallets&lt;/a&gt;&lt;/strong&gt; for Ethereum, Bitcoin and Solana in the core.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An ORM that maps &lt;a href="https://www.codenameone.com/blog/kafka-mail-and-records-in-your-java-backend/" rel="noopener noreferrer"&gt;Java records&lt;/a&gt;&lt;/strong&gt; as entities, which JPA still forbids.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Performance belongs here too. Codename One's &lt;code&gt;Base64&lt;/code&gt; on iOS uses a portable SIMD API we built into ParparVM, our ahead-of-time compiler, and it &lt;a href="https://www.codenameone.com/blog/ios-density-scroll-and-accessibility/" rel="noopener noreferrer"&gt;beats Apple's own implementation&lt;/a&gt;: 379 ms to encode against Apple's 1078 ms, 365 ms to decode against 713 ms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmzc1j9e5v72s67p3zf2f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmzc1j9e5v72s67p3zf2f.png" alt="Base64 performance on iOS: native encode 1078 ms, Codename One SIMD 379 ms; native decode 713 ms, Codename One SIMD 365 ms" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Security is where this matters most. A financial app needs certificate pinning, passkeys, device keys, signed requests, screens hidden from screenshots and the app switcher, jailbreak and root detection, and obfuscation with string encryption. Each has a different pitfall on each platform, and most fail silently: the app works, it isn't protected. Two codebases means getting every one of them right twice. We built them once, and our &lt;a href="https://www.codenameone.com/blog/bastion-hardened-bank-template/" rel="noopener noreferrer"&gt;Bastion bank template&lt;/a&gt; uses all of them in a working bank and exchange. Its Security Center shows which protections are live on that device and build, and a test fails the build if the screen ever claims more than the build delivers.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fbastion-security-center.png" class="article-body-image-wrapper"&gt;&lt;img width="420" height="860" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fbastion-security-center.png" alt="The Bastion Security Center listing active protections"&gt;&lt;/a&gt;Bastion's Security Center.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fbastion-sign-in-flow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fbastion-sign-in-flow.png" alt="The Bastion sign-in flow with passkeys and TOTP" width="799" height="545"&gt;&lt;/a&gt;Sign-in with passkeys and TOTP.&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The full stack is where one codebase pays twice
&lt;/h2&gt;

&lt;p&gt;Shopify's server is a separate world with separate teams. (If Ruby is what it takes to win them over, I'll consider a Ruby port. Probably.)&lt;/p&gt;

&lt;p&gt;For everyone else, the phone app, the desktop app, the web app and the server in one Java project means one set of entity classes, one debugger session that follows a request from a tap to the database, and a compile error instead of a production incident when someone renames a field. When the system changes every week, seeing all of its state in one place is the difference between moving fast and guessing. Shopify now has three codebases that have to agree on every field.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// shared module: used by the app AND the server&lt;/span&gt;
&lt;span class="nd"&gt;@Entity&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;@Id&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;totalCents&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// backend&lt;/span&gt;
&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Orders&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;@PostMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/orders"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="nf"&gt;place&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  More This Week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Calendars, Gantt charts and a booking app
&lt;/h3&gt;

&lt;p&gt;Neither iOS nor Android ships a calendar view or a Gantt chart, so every business app ends up writing one. Codename One now has a &lt;code&gt;Scheduler&lt;/code&gt; with day, week, month, agenda and per-resource views:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;DefaultScheduleModel&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DefaultScheduleModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ScheduleItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"review"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Design review"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nc"&gt;TimeMath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;zone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TimeMath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;zone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDetail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Room 2"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Scheduler&lt;/span&gt; &lt;span class="n"&gt;scheduler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Scheduler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;scheduler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Scheduler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;WEEK&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a &lt;code&gt;Gantt&lt;/code&gt; with dependencies, baselines, the critical path and resource leveling that tells you what moving people around costs before you apply it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nc"&gt;ResourceLeveler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findOverallocations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;LevelingResult&lt;/span&gt; &lt;span class="n"&gt;proposal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ResourceLeveler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isChanged&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;proposal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-week.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fscheduler-week.png" alt="The scheduler's week view" width="800" height="356"&gt;&lt;/a&gt;The week view.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-critical-path.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-critical-path.png" alt="A Gantt chart with the critical path highlighted" width="800" height="356"&gt;&lt;/a&gt;The critical path.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-leveled.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fgantt-leveled.png" alt="A Gantt chart after resource leveling" width="409" height="919"&gt;&lt;/a&gt;After resource leveling.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-date.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fgenerated%2Fpicker-material-date.png" alt="The Material 3 date picker" width="409" height="457"&gt;&lt;/a&gt;The Material 3 date picker.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Slate, our booking template, is the same idea as a full product: clients, providers and an owner, with a slot engine that weighs rooms, buffers and travel time.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/slate-desktop-demo.mp4" rel="noopener noreferrer"&gt;Download the Slate video&lt;/a&gt;.

&lt;p&gt;Saturday's &lt;a href="https://www.codenameone.com/blog/scheduler-gantt-and-material-pickers/" rel="noopener noreferrer"&gt;article&lt;/a&gt; covers both.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commerce with no commission
&lt;/h3&gt;

&lt;p&gt;Subscription platforms take a percentage of your revenue on top of what Apple and Google take. We never touch your money, so there's no commission. &lt;code&gt;CommerceManager&lt;/code&gt; gives you entitlements, offerings, paywalls, experiments and a customer center across the App Store, Google Play, Amazon, Stripe and Paddle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;CommerceManager&lt;/span&gt; &lt;span class="n"&gt;cm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CommerceManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;cm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEntitled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"pro"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Offering&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getOfferings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCurrent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;Paywall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fog539w882pvnk6iphow8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fog539w882pvnk6iphow8.png" alt="The Commerce console" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sunday's &lt;a href="https://www.codenameone.com/blog/subscriptions-and-paywalls-without-a-revenue-cut/" rel="noopener noreferrer"&gt;commerce article&lt;/a&gt; has refunds, retention offers, experiments, and invites.&lt;/p&gt;

&lt;h3&gt;
  
  
  Records as entities, Kafka and mail
&lt;/h3&gt;

&lt;p&gt;JPA still forbids records as entities. Codename One's ORM maps them on the phone and the server, and generates a builder for each:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Entity&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;Note&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Id&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;@Version&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;Note&lt;/span&gt; &lt;span class="n"&gt;saved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NoteBuilder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Groceries"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Note&lt;/span&gt; &lt;span class="n"&gt;changed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NoteBuilder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;saved&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backend now talks to Kafka, RabbitMQ, Redis Streams, SQS and Pub/Sub through one API. Spring's &lt;code&gt;@KafkaListener&lt;/code&gt; and &lt;code&gt;@RabbitListener&lt;/code&gt; work as written, and a message sent inside a transaction goes out only after the commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@MessageListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"orders.placed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"shipping"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;concurrency&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;placed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ship it&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mail goes out through SMTP or SES from the same transactional outbox, and server-sent events stream with resume support. Monday's &lt;a href="https://www.codenameone.com/blog/kafka-mail-and-records-in-your-java-backend/" rel="noopener noreferrer"&gt;backend article&lt;/a&gt; walks through it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Splat, and shipping games on Steam
&lt;/h3&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-13/splat-desktop-demo.mp4" rel="noopener noreferrer"&gt;Download the Splat video&lt;/a&gt;.

&lt;p&gt;Splat is a first-person team paintball shooter: four against four, refereed by its own server, with fog, PBR materials, shadows and post processing on every GPU backend. It taught us that the art makes the game, not the engine.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fblog%2Frelease-2026-11-13%2Fsplat-in-game.jpg" class="article-body-image-wrapper"&gt;&lt;img width="800" height="470" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fblog%2Frelease-2026-11-13%2Fsplat-in-game.jpg" alt="A first-person view of a Splat capture the flag match"&gt;&lt;/a&gt;Capture the flag.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-match-overhead.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-match-overhead.png" alt="An overhead view of a Splat match" width="800" height="1422"&gt;&lt;/a&gt;The field from above.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-mission-editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fsplat-mission-editor.png" alt="The Splat mission editor" width="800" height="470"&gt;&lt;/a&gt;The mission builder.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Games now ship to Steam from the build cloud, and Steam features come from portable code that does nothing on other platforms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isAvailable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;             &lt;span class="c1"&gt;// true on Steam&lt;/span&gt;
    &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;unlockAchievement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"FIRST_WIN"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;GameServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeSave&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"slot1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;saveBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tuesday's &lt;a href="https://www.codenameone.com/blog/ship-your-java-game-on-steam/" rel="noopener noreferrer"&gt;article&lt;/a&gt; has all four videos, including the mission builder on the phone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Windows kiosks and command line tools
&lt;/h3&gt;

&lt;p&gt;One build hint turns an app into a locked down kiosk for Windows 10 and 11 IoT Enterprise, and &lt;code&gt;mvn cn1:deploy-device&lt;/code&gt; installs it over SSH. Receipt printers and scales are a serial port away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;SerialPort&lt;/span&gt; &lt;span class="n"&gt;printer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openSerial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"COM3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;SerialPort&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;PARITY_NONE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the other end, the console API builds command line tools that compile to a native executable with no JVM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Service"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Status"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Replicas"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addRow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;style&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"running"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;GREEN&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Prompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Environment"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"staging"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"production"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fcli-console-output.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fcli-console-output.png" alt="A table, a progress bar and a spinner in the terminal" width="800" height="432"&gt;&lt;/a&gt;Tables, progress and spinners.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fcli-console-select.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fcli-console-select.png" alt="An arrow key selection prompt" width="800" height="182"&gt;&lt;/a&gt;Interactive prompts.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Wednesday's &lt;a href="https://www.codenameone.com/blog/windows-kiosks-and-command-line-apps/" rel="noopener noreferrer"&gt;article&lt;/a&gt; has both.&lt;/p&gt;

&lt;h3&gt;
  
  
  An LLM on the phone
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;LlmClient.local&lt;/code&gt; runs a GGUF model through llama.cpp on the device, behind the same API as the cloud clients. JSON output is enforced with a grammar, so it always parses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;LlmClient&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LocalLlmClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSupported&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="nc"&gt;LlmClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;modelPath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;LlmClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ollama&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;          &lt;span class="c1"&gt;// desktop development&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ChatRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ChatMessage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Name three primes"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;p&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A whisper cn1lib turns speech into text offline, so a voice memo becomes a summary without leaving the phone. Thursday's &lt;a href="https://www.codenameone.com/blog/run-an-llm-on-the-phone/" rel="noopener noreferrer"&gt;article&lt;/a&gt; shows how.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix the abstraction. Don't delete it.
&lt;/h2&gt;

&lt;p&gt;React Native is a heavyweight toolkit, and heavyweight toolkits deserve to die. Shopify answered a bad abstraction with no abstraction, and signed up to pay for every platform, every test suite and every store rule twice, forever, on the theory that typing was the bottleneck. It never was.&lt;/p&gt;

&lt;p&gt;If I were a Shopify competitor, I'd jump on this. When the leader zags, you zig. Pick up Codename One, KMP, Flutter or any other decent platform with one codebase, and put an agent to work on it. Every hour the agent spends goes into one product that ships everywhere, not into keeping two copies in step. By the time Shopify notices, you'll be so far ahead that catching up will take them years.&lt;/p&gt;

&lt;p&gt;The answer to a bad abstraction is a good one: a lightweight UI you own, compiled to a native app, from one codebase, on every screen your users have.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Debug Your Dart in a Java Debugger, and JFX Central on a Phone</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Thu, 19 Nov 2026 14:01:11 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/debug-your-dart-in-a-java-debugger-and-jfx-central-on-a-phone-366e</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/debug-your-dart-in-a-java-debugger-and-jfx-central-on-a-phone-366e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fea285fr731ono97q3xsw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fea285fr731ono97q3xsw.jpg" alt="JFX Central running on an iPhone" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two weeks ago we showed that Codename One can &lt;a href="https://www.codenameone.com/blog/flutter-better-in-java/" rel="noopener noreferrer"&gt;build a Flutter app from its Dart source&lt;/a&gt; and run it faster than Flutter's own build on most of our benchmarks. The first question from people who tried it was a fair one: what happens when something breaks? You'd be staring at a stack trace full of generated Java. That's fixed, and this post also rounds up the rest of the week's work on code you already have.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dart stack traces in a Java debugger
&lt;/h2&gt;

&lt;p&gt;The Dart transpiler turns your &lt;code&gt;.dart&lt;/code&gt; files into Java, and javac compiles that. Normally the class files would point at the generated Java, which you never wrote and shouldn't have to read.&lt;/p&gt;

&lt;p&gt;Now they point at your Dart. While it translates, the emitter records which Dart line produced each Java line. After javac runs, the build rewrites the debug information in every class file: line numbers become Dart line numbers, the source file becomes your &lt;code&gt;.dart&lt;/code&gt; file, and a JSR-45 source map is added with Dart as the default stratum. The mapping table itself is stripped, so nothing extra ships in your app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBEW2xpYi9tYWluLmRhcnRdIC0tPnx0cmFuc3BpbGVyIG1hcmtzIGVhY2ggbGluZXwgSltHZW5lcmF0ZWQgSmF2YV0KICAgIEogLS0-fGphdmFjfCBDW0NsYXNzIGZpbGVzIHBvaW50aW5nIGF0IEphdmFdCiAgICBDIC0tPnxEYXJ0TGluZU1hcHBlciByZXdyaXRlcyBkZWJ1ZyBpbmZvfCBSW0NsYXNzIGZpbGVzIHBvaW50aW5nIGF0IG1haW4uZGFydDxici8-bGluZSBudW1iZXJzICsgU01BUCwgc3RyYXR1bSBEYXJ0XQogICAgUiAtLT4gWFtTdGFjayB0cmFjZXMgYW5kIGRlYnVnZ2VycyBzaG93IERhcnRd%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBEW2xpYi9tYWluLmRhcnRdIC0tPnx0cmFuc3BpbGVyIG1hcmtzIGVhY2ggbGluZXwgSltHZW5lcmF0ZWQgSmF2YV0KICAgIEogLS0-fGphdmFjfCBDW0NsYXNzIGZpbGVzIHBvaW50aW5nIGF0IEphdmFdCiAgICBDIC0tPnxEYXJ0TGluZU1hcHBlciByZXdyaXRlcyBkZWJ1ZyBpbmZvfCBSW0NsYXNzIGZpbGVzIHBvaW50aW5nIGF0IG1haW4uZGFydDxici8-bGluZSBudW1iZXJzICsgU01BUCwgc3RyYXR1bSBEYXJ0XQogICAgUiAtLT4gWFtTdGFjayB0cmFjZXMgYW5kIGRlYnVnZ2VycyBzaG93IERhcnRd%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="1476" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We didn't have to build a debugger. There's no Dart debugger and no IDE plugin. The Java debugger already knows how to read line tables, source file attributes and JSR-45 source maps, which is how JSP debugging has worked for twenty years. So an exception's stack trace names &lt;code&gt;main.dart&lt;/code&gt; and the Dart line, and a debugger attached to the simulator resolves breakpoints and steps through your Dart source. It happens automatically in Maven and Gradle builds of any project with &lt;code&gt;src/main/flutter&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Flutter fixes from a real port
&lt;/h2&gt;

&lt;p&gt;We took several real Flutter apps through the import, and each one found something. The fixes landed in the transpiler and the runtime rather than as workarounds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generics substitution, closures that capture and modify locals, local recursive functions, tear-offs, constructor redirects and functions that return &lt;code&gt;Never&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;An isolate event loop, so timers and queued callbacks run in the order Dart promises.&lt;/li&gt;
&lt;li&gt;Lists that remember their element type, so a wrong downcast fails where Dart says it should.&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;async&lt;/code&gt; main that waits on &lt;code&gt;async*&lt;/code&gt; streams, &lt;code&gt;String.runes&lt;/code&gt;, and a long list of Flutter API and &lt;code&gt;dart:*&lt;/code&gt; gaps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three clean-room apps written for this, a club hub, a field notes app and a pet adoption app, now run as acceptance tests on every change, and Gradle builds can import Flutter projects too.&lt;/p&gt;

&lt;h2&gt;
  
  
  A faster JavaScript port that still gets the right answer
&lt;/h2&gt;

&lt;p&gt;Last time I mentioned that Flutter's web build is faster than ours on some workloads, partly because it gets some of them wrong. We wanted speed without giving that up. The JavaScript port now inlines getters and setters, fuses &lt;code&gt;StringBuilder&lt;/code&gt; chains that don't escape into plain string operations, keeps every array packed so the browser's JIT never sees holes, and turns virtual calls into direct ones when type flow proves there's only one target.&lt;/p&gt;

&lt;p&gt;In our compute suite, string building dropped from 99 to 68 ms, quicksort by 6% and sequential array access by 5%, and the checksums still match the JVM exactly. We also measured and dropped three ideas that sounded good: scalar replacement (V8 already does it), bounds-check elimination (it was slower) and removing repeated casts (they're free). And integer division by zero now throws &lt;code&gt;ArithmeticException&lt;/code&gt; on the web, as Java says it should, instead of quietly returning zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  JFX Central on an iPhone
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.jfx-central.com/" rel="noopener noreferrer"&gt;JFX Central&lt;/a&gt; is the JavaFX community's hub: people, libraries, apps, books and videos, written in JavaFX by people who know JavaFX very well. We ported it to phones on top of our JavaFX compatibility layer, and this is it running on an iPhone:&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/JFXCentral-demo.mp4" rel="noopener noreferrer"&gt;Download the JFX Central video&lt;/a&gt;.

&lt;p&gt;It doesn't feel as polished as an app written for Codename One from the start. But it's a real JavaFX codebase, with bindings, cells, CSS and remote images everywhere, running on a phone, and getting there filled real gaps in the layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ListProperty&lt;/code&gt; listeners fire on content changes, and &lt;code&gt;ObservableValue.map&lt;/code&gt;, &lt;code&gt;flatMap&lt;/code&gt; and &lt;code&gt;orElse&lt;/code&gt; work.&lt;/li&gt;
&lt;li&gt;Remote images load in the background through the same cache as &lt;code&gt;URLImage&lt;/code&gt;, and the layout updates when they arrive.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Label&lt;/code&gt; text wraps onto several lines, and &lt;code&gt;ImageView&lt;/code&gt; honors &lt;code&gt;-fx-fit-width&lt;/code&gt;, &lt;code&gt;-fx-fit-height&lt;/code&gt; and &lt;code&gt;-fx-preserve-ratio&lt;/code&gt; from CSS.&lt;/li&gt;
&lt;li&gt;Cells no longer try to set a bound &lt;code&gt;visible&lt;/code&gt; property, which used to throw.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/desktop-interop/" rel="noopener noreferrer"&gt;desktop compatibility chapter&lt;/a&gt; covers what carries over from JavaFX and Swing, and the &lt;a href="https://www.codenameone.com/developer-guide/flutter-interop/" rel="noopener noreferrer"&gt;Flutter chapter&lt;/a&gt; covers the import.&lt;/p&gt;

&lt;p&gt;That's the week. Friday starts the next one.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Port Your Spring Code With Fewer Edits, and Libraries That Bring Their Own Server</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:29:49 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/port-your-spring-code-with-fewer-edits-and-libraries-that-bring-their-own-server-207p</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/port-your-spring-code-with-fewer-edits-and-libraries-that-bring-their-own-server-207p</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faf6bpulhyon2uiqrhdmn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faf6bpulhyon2uiqrhdmn.jpg" alt="A library package with a client and a server half" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Codename One backend compiles your server to a native executable that starts in 40 ms and idles in about 9 MB. The catch has always been porting: real Spring services lean on dozens of small conveniences, and every one that's missing is an edit. This round we took real services across and fixed what they tripped on, so most of this post is code that now moves over with nothing but its imports changed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Spring controller, mostly unchanged
&lt;/h2&gt;

&lt;p&gt;Here's a typical order endpoint. Every line of the body works on the backend now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@CrossOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;origins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://shop.example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;allowCredentials&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;Logger&lt;/span&gt; &lt;span class="no"&gt;LOG&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLogger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;OrderController&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@Autowired&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;OrderRepository&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@PostMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"/orders"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;consumes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;produces&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="nf"&gt;place&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ResponseStatusException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"An order needs at least one line"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="no"&gt;MDC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"customer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="no"&gt;LOG&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Placing order with {} lines"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="no"&gt;MDC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"customer"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What changed to make that work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;consumes&lt;/code&gt; and &lt;code&gt;produces&lt;/code&gt;&lt;/strong&gt; are checked. A request with the wrong &lt;code&gt;Content-Type&lt;/code&gt; gets a 415, and one whose &lt;code&gt;Accept&lt;/code&gt; header can't be satisfied gets a 406, before your method runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@CrossOrigin&lt;/code&gt;&lt;/strong&gt; answers preflight requests and sets the CORS headers, with the same defaults as Spring: any origin, a 30 minute &lt;code&gt;max-age&lt;/code&gt;, and credentials only when you ask.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ResponseStatusException&lt;/code&gt;&lt;/strong&gt; picks the status and the message of the error response, so validation code doesn't need a custom exception handler.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Logger&lt;/code&gt; and &lt;code&gt;MDC&lt;/code&gt;&lt;/strong&gt; in &lt;code&gt;com.codename1.backend.log&lt;/code&gt; use &lt;code&gt;{}&lt;/code&gt; placeholders, levels from &lt;code&gt;logging.level.*&lt;/code&gt; properties as in Spring Boot, and a per-thread diagnostic context for request and customer ids.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The imports point at &lt;code&gt;com.codename1.backend&lt;/code&gt; instead of &lt;code&gt;org.springframework&lt;/code&gt;, and that's the edit.&lt;/p&gt;

&lt;h2&gt;
  
  
  JSON with your own classes, and no reflection
&lt;/h2&gt;

&lt;p&gt;Controllers already turned plain classes into JSON. Now your own code can do the same anywhere, through &lt;code&gt;Json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nd"&gt;@JsonProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"placed_at"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt; &lt;span class="n"&gt;placedAt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;OrderLine&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ArrayList&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;OrderLine&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;history&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The codecs are generated at build time for the classes you use, so there's no reflection at run time and nothing for the native build to strip away. &lt;code&gt;Json.convert&lt;/code&gt; turns an already parsed map into a typed object, which helps when you only know the type after you've looked at a field.&lt;/p&gt;

&lt;h2&gt;
  
  
  More of the JDK your code already uses
&lt;/h2&gt;

&lt;p&gt;The backend runs on our own class library, so every missing JDK class used to be a rewrite. These are now there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;BigDecimal&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BigDecimal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ZERO&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;OrderLine&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;BigDecimal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;valueOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;YearMonth&lt;/span&gt; &lt;span class="n"&gt;billing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;YearMonth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;LocalDate&lt;/span&gt; &lt;span class="n"&gt;due&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LocalDate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;TemporalAdjusters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lastDayOfMonth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ResponseStatusException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Not an email address"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;Semaphore&lt;/span&gt; &lt;span class="n"&gt;gate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Semaphore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                       &lt;span class="c1"&gt;// at most four calls out at once&lt;/span&gt;
&lt;span class="nc"&gt;ConcurrentLinkedQueue&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;outbox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ConcurrentLinkedQueue&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;String.matches&lt;/code&gt;, &lt;code&gt;split&lt;/code&gt; and &lt;code&gt;replaceAll&lt;/code&gt; work, and so does &lt;code&gt;java.util.regex&lt;/code&gt;, which the build moves to our own regex engine for you. &lt;code&gt;Flow&lt;/code&gt; and &lt;code&gt;InetAddress&lt;/code&gt; are there too.&lt;/p&gt;

&lt;p&gt;The HTTP client can insist on HTTP/2 with &lt;code&gt;setRequireHttp2(true)&lt;/code&gt;. A streaming XML pull parser reads feeds and SOAP replies, and it refuses &lt;code&gt;DOCTYPE&lt;/code&gt;, so XML external entity attacks have nothing to hook into. XML property lists and an image header reader for PNG, JPEG, GIF and WebP round it out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data and security
&lt;/h2&gt;

&lt;p&gt;The ORM learned &lt;code&gt;@Lob&lt;/code&gt; and the &lt;code&gt;insertable&lt;/code&gt; and &lt;code&gt;updatable&lt;/code&gt; flags on &lt;code&gt;@Column&lt;/code&gt;, and &lt;code&gt;CrudRepository&lt;/code&gt; gained more of Spring Data's methods. On the security side, a &lt;code&gt;{sha256}&lt;/code&gt; password encoder lets you import a user table hashed by an older system without forcing every user to reset, and remember-me devices keep people signed in on the browsers they trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Libraries that bring their own server
&lt;/h2&gt;

&lt;p&gt;Most features need a server too. Comments need a table and an endpoint. Push needs a place to store tokens. A payment flow needs a webhook. Until now a cn1lib could give you the client half, and the README told you what to write on the server. Everyone wrote it a little differently, and a little wrong.&lt;/p&gt;

&lt;p&gt;Now a library can ship both halves, and the server half wires itself in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the library carries
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBMW25vdGVsaWIuY24xbGliXSAtLT4gQ1tDbGllbnQgaGFsZjxici8-VUksIEFQSSBjYWxsc10KICAgIEwgLS0-IFpbYmFja2VuZC56aXA8YnIvPmNvbnRyb2xsZXJzLCBzZXJ2aWNlcywgZW50aXRpZXMsIGRiL21pZ3JhdGlvbl0KICAgIEMgLS0-IEFbWW91ciBhcHBdCiAgICBaIC0tPiBTW1lvdXIgc2VydmVyIGJ1aWxkXQogICAgUyAtLT4gV1tSb3V0ZXMsIGJlYW5zLCBkYXRhIGFjY2VzcyBhbmQgbWlncmF0aW9uczxici8-d2lyZWQgYXMgaWYgdGhlIHNlcnZlciBjb21waWxlZCB0aGVtXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBMW25vdGVsaWIuY24xbGliXSAtLT4gQ1tDbGllbnQgaGFsZjxici8-VUksIEFQSSBjYWxsc10KICAgIEwgLS0-IFpbYmFja2VuZC56aXA8YnIvPmNvbnRyb2xsZXJzLCBzZXJ2aWNlcywgZW50aXRpZXMsIGRiL21pZ3JhdGlvbl0KICAgIEMgLS0-IEFbWW91ciBhcHBdCiAgICBaIC0tPiBTW1lvdXIgc2VydmVyIGJ1aWxkXQogICAgUyAtLT4gV1tSb3V0ZXMsIGJlYW5zLCBkYXRhIGFjY2VzcyBhbmQgbWlncmF0aW9uczxici8-d2lyZWQgYXMgaWYgdGhlIHNlcnZlciBjb21waWxlZCB0aGVtXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="744" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Maven cn1lib archetype now has a &lt;code&gt;backend&lt;/code&gt; module. Put the server classes in &lt;code&gt;backend/src/main/java&lt;/code&gt; and build. The &lt;code&gt;.cn1lib&lt;/code&gt; then carries them as &lt;code&gt;backend.zip&lt;/code&gt; next to the client parts. With Gradle the sources go in &lt;code&gt;src/backend/java&lt;/code&gt; and publish as &lt;code&gt;&amp;lt;library&amp;gt;-backend&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On the server that uses it, you add one dependency:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;com.example&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;notelib-backend&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;1.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The library's &lt;code&gt;@RestController&lt;/code&gt; classes get routes, its &lt;code&gt;@Component&lt;/code&gt; and &lt;code&gt;@Service&lt;/code&gt; classes become beans your code can inject, its entities and repositories get their data access, and its &lt;code&gt;db/migration&lt;/code&gt; scripts run with yours. All of it is wired at build time, like your own code, so there's no classpath scanning at startup.&lt;/p&gt;

&lt;p&gt;Two rules keep this predictable. A jar only takes part if it carries the marker resource &lt;code&gt;META-INF/codenameone/backend-library&lt;/code&gt;; any other jar is an ordinary dependency and nothing in it gets wired. And if your server defines a class with the same name as the library's, yours wins, so you can override any piece you don't like.&lt;/p&gt;

&lt;p&gt;A library can also be server-only: a plain jar that depends on &lt;code&gt;codenameone-backend&lt;/code&gt; with &lt;code&gt;provided&lt;/code&gt; scope and carries the marker.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/backend-beans/#backend-libraries" rel="noopener noreferrer"&gt;backend libraries section&lt;/a&gt; covers packaging, and the &lt;a href="https://www.codenameone.com/developer-guide/backend-web/" rel="noopener noreferrer"&gt;backend web chapter&lt;/a&gt; covers JSON, the client and the rest.&lt;/p&gt;

&lt;p&gt;Tomorrow: &lt;a href="https://www.codenameone.com/blog/debug-dart-in-a-java-debugger/" rel="noopener noreferrer"&gt;Debug Your Dart in a Java Debugger, and JFX Central on a Phone&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Packaging Java Apps for Xbox Developer Mode, and Why Consoles Need Help</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Tue, 17 Nov 2026 14:15:41 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/packaging-java-apps-for-xbox-developer-mode-and-why-consoles-need-help-4ob</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/packaging-java-apps-for-xbox-developer-mode-and-why-consoles-need-help-4ob</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ijkoqv673iovlq51331.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ijkoqv673iovlq51331.jpg" alt="A game controller next to a Java app" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Codename One targets iOS, Android, macOS, Windows, Linux, the web, watches, TVs and now embedded boards. There's one major category missing: game consoles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The technical side looks manageable. A console is a computer with a GPU and a controller, and we already render through Metal, Direct3D and OpenGL ES and map controllers to game actions. They're hard because everything about them sits behind a non-disclosure agreement. This week we took the first step that doesn't need one.&lt;/p&gt;

&lt;h2&gt;
  
  
  One build hint
&lt;/h2&gt;

&lt;p&gt;Any retail Xbox can be switched into Developer Mode, which lets you sideload UWP apps for testing. Codename One can now build that package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="na"&gt;codename1.arg.windows.xbox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That builds the native Windows port as a UWP app and packages it as a signed &lt;code&gt;.msix&lt;/code&gt;. If you don't provide a certificate, the build makes a self-signed development one next to the package. Then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Dev Home on the console and turn on Developer Mode and Remote Access.&lt;/li&gt;
&lt;li&gt;Open the Device Portal at &lt;code&gt;https://&amp;lt;console&amp;gt;:11443&lt;/code&gt; in a browser.&lt;/li&gt;
&lt;li&gt;Under Home, add the &lt;code&gt;.msix&lt;/code&gt; and pick the &lt;code&gt;.cer&lt;/code&gt; the build produced.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can try the same package on a Windows PC first: import the certificate into the Local Machine's Trusted People store, then run &lt;code&gt;Add-AppxPackage&lt;/code&gt; on the &lt;code&gt;.msix&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes on a console
&lt;/h2&gt;

&lt;p&gt;A console app isn't a desktop app with a bigger screen. Three things had to change in the port:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBHW1lvdXIgZ2FtZSBvciBhcHA8YnIvPmNvbS5jb2RlbmFtZTEuZ2FtaW5nLCBVbml0eSBpbXBvcnQsIG9yIGFueSBDTjEgYXBwXSAtLT4gUFtOYXRpdmUgV2luZG93cyBwb3J0XQogICAgUCAtLT58d2luZG93cy54Ym94PXRydWV8IFVbVVdQIGFwcCBjb250YWluZXI8YnIvPkNvcmVXaW5kb3csIG5vIGRlc2t0b3Agd2luZG93XQogICAgVSAtLT4gUltEaXJlY3QyRCBpbnRvIGEgRGlyZWN0M0Qgc3dhcCBjaGFpbl0KICAgIFUgLS0-IElbQ29udHJvbGxlcjogRC1wYWQgYW5kIHN0aWNrIHRvIGRpcmVjdGlvbnM8YnIvPkEgdG8gZmlyZSwgQiB0byBiYWNrXQogICAgVSAtLT4gU1tUViBvdmVyc2NhbiBhcyB0aGUgZGlzcGxheSBzYWZlIGFyZWFd%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBHW1lvdXIgZ2FtZSBvciBhcHA8YnIvPmNvbS5jb2RlbmFtZTEuZ2FtaW5nLCBVbml0eSBpbXBvcnQsIG9yIGFueSBDTjEgYXBwXSAtLT4gUFtOYXRpdmUgV2luZG93cyBwb3J0XQogICAgUCAtLT58d2luZG93cy54Ym94PXRydWV8IFVbVVdQIGFwcCBjb250YWluZXI8YnIvPkNvcmVXaW5kb3csIG5vIGRlc2t0b3Agd2luZG93XQogICAgVSAtLT4gUltEaXJlY3QyRCBpbnRvIGEgRGlyZWN0M0Qgc3dhcCBjaGFpbl0KICAgIFUgLS0-IElbQ29udHJvbGxlcjogRC1wYWQgYW5kIHN0aWNrIHRvIGRpcmVjdGlvbnM8YnIvPkEgdG8gZmlyZSwgQiB0byBiYWNrXQogICAgVSAtLT4gU1tUViBvdmVyc2NhbiBhcyB0aGUgZGlzcGxheSBzYWZlIGFyZWFd%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="985" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The app container.&lt;/strong&gt; There's no desktop window. The port runs on a &lt;code&gt;CoreWindow&lt;/code&gt; and draws with Direct2D into a Direct3D swap chain. The build links against &lt;code&gt;WindowsApp.lib&lt;/code&gt; alone, which proves at build time that every system call the port makes is allowed inside the container. If something isn't allowed, the build fails instead of the console.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The controller.&lt;/strong&gt; The D-pad and the left stick arrive as the four directions, A as fire and B as back, through the same &lt;code&gt;Display.getGameAction()&lt;/code&gt; your game already uses for arrow keys. A game written with &lt;code&gt;com.codename1.gaming&lt;/code&gt; or imported from a Unity 2D project doesn't need console-specific input code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The TV.&lt;/strong&gt; Televisions crop the edges of the picture. The visible area the console reports comes through &lt;code&gt;Display.getDisplaySafeArea()&lt;/code&gt;. Use it to keep the score and the menus where people can see them.&lt;/p&gt;

&lt;p&gt;Here's how a game reads input, unchanged from phone to desktop to console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;keyPressed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;keyCode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getGameAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keyCode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;GAME_LEFT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="n"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;moveLeft&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;GAME_RIGHT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;moveRight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;GAME_FIRE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="n"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;jump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Where it stands
&lt;/h2&gt;

&lt;p&gt;This is experimental, and the limits are real.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CI cross-compiles the target on Linux, installs the package on a Windows machine and checks that it reaches its first frame inside the app container. We haven't run it on a real Xbox yet. Controller input and overscan only exist on the console, so both are untested.&lt;/li&gt;
&lt;li&gt;Some things the desktop port does aren't available in the container: secondary windows, menus, the tray, native text editors, file dialogs, the clipboard, printing, the camera, audio recording and the share sheet. The only file root is the app's local folder.&lt;/li&gt;
&lt;li&gt;Most important: &lt;strong&gt;Developer Mode is a test sandbox, not a store.&lt;/strong&gt; You can't sell a game this way. Retail Xbox titles are built with Microsoft's Game Development Kit under a publishing agreement.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why consoles need a different kind of help
&lt;/h2&gt;

&lt;p&gt;Every console platform holder, Microsoft, Sony and Nintendo, keeps its SDK, its development hardware and its certification process behind an NDA. You get access by signing a publishing or developer agreement, and what you learn under it can't be published. That's a hard wall for an open source project. We can't put code that uses those SDKs in a public repository, and we can't even describe the APIs in a public issue.&lt;/p&gt;

&lt;p&gt;So a console port has two halves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The portable half&lt;/strong&gt; belongs in Codename One, in the open: the windowless host, controller mapping, the safe area and game code that runs anywhere. That's what this week's Xbox work builds and exercises.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The platform half&lt;/strong&gt; depends on each SDK. It would have to stay proprietary and be available only to developers who hold a license for that console's SDK.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'd like to get there. If you work at a platform holder, at a studio with console agreements, or you know the right person to talk to, please &lt;a href="https://www.codenameone.com/contact-us.html" rel="noopener noreferrer"&gt;reach out&lt;/a&gt;. A Java game on a console, written once and also shipped to phones, desktop and the web, is something I think a lot of small studios would use.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/working-with-windows/#xbox-developer-mode" rel="noopener noreferrer"&gt;Windows chapter&lt;/a&gt; covers building and installing, and the &lt;a href="https://www.codenameone.com/developer-guide/gaming-consoles/" rel="noopener noreferrer"&gt;gaming consoles appendix&lt;/a&gt; tracks the state of console work.&lt;/p&gt;

&lt;p&gt;Tomorrow: &lt;a href="https://www.codenameone.com/blog/cn1libs-with-a-server-side/" rel="noopener noreferrer"&gt;Port Your Spring Code With Fewer Edits, and Libraries That Bring Their Own Server&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Real-Time Java: Control Loops the Garbage Collector Never Stops</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Mon, 16 Nov 2026 14:26:22 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/real-time-java-control-loops-the-garbage-collector-never-stops-4gop</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/real-time-java-control-loops-the-garbage-collector-never-stops-4gop</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj6xgt5icwhlzrvc5bqq3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj6xgt5icwhlzrvc5bqq3.jpg" alt="A stopwatch over a periodic timeline" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Friday's &lt;a href="https://www.codenameone.com/blog/embedded-linux-ui-in-18-mb/" rel="noopener noreferrer"&gt;embedded Linux post&lt;/a&gt; I promised the hardcore part. A device with a touchscreen is one thing. A device that drives a motor, reads a force sensor or balances something is another, because the code that does that has deadlines. Miss one and the motor stutters, the reading is stale, or the thing falls over.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The standard advice is that you can't write that code in Java. The garbage collector will stop your thread at the worst moment. This post explains what real time actually requires, why that advice is usually right, how real-time JVMs like JamaicaVM and the RTSJ got around it, and the approach we took because we own the VM.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "real time" means
&lt;/h2&gt;

&lt;p&gt;Real time doesn't mean fast. It means &lt;em&gt;on time, every time&lt;/em&gt;. A loop that usually takes 50 microseconds and occasionally takes 30 milliseconds is fast and useless. A loop that always finishes within 900 microseconds of a 1-millisecond period is slow and perfect.&lt;/p&gt;

&lt;p&gt;A few terms you'll see everywhere:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Period.&lt;/strong&gt; How often the loop runs. A motor drive might run every millisecond (1 kHz).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deadline.&lt;/strong&gt; When the work for one period has to be done, usually by the start of the next.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release latency.&lt;/strong&gt; How late the thread actually woke up compared to when it was scheduled. This is what the operating system and the runtime add.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jitter.&lt;/strong&gt; How much that latency varies. Steady lateness can be compensated for; jitter can't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worst case.&lt;/strong&gt; The only number that matters. An average of 5 microseconds with a worst case of 20 milliseconds is a 20 millisecond system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then the three flavors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hard real time.&lt;/strong&gt; A missed deadline is a failure, possibly a dangerous one. Airbags, flight controls, pacemakers. These are certified against standards like IEC 61508, ISO 26262 or DO-178C, and usually run on an RTOS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firm real time.&lt;/strong&gt; A missed deadline makes that result worthless, but the system survives. A motor controller that holds its last output for one cycle. Most industrial and robotics loops live here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Soft real time.&lt;/strong&gt; Late results are worth less but still worth something. Audio, video, games.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We target &lt;strong&gt;firm&lt;/strong&gt; real time on a PREEMPT_RT Linux kernel. That's an important line, so I'll say it plainly: this is not a certified hard real-time system, and a loop whose failure can hurt someone still needs an independent safety mechanism like a hardware watchdog or an interlock. If you need hard, certified real time, that's work we'd like to do with you, but it isn't what shipped this week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is hard for a high-level language
&lt;/h2&gt;

&lt;p&gt;A C programmer on PREEMPT_RT gets a lot for free. Set &lt;code&gt;SCHED_FIFO&lt;/code&gt;, lock memory, pin a core, don't call &lt;code&gt;malloc&lt;/code&gt; in the loop. The kernel does the rest, and since kernel 6.12 PREEMPT_RT is part of mainline Linux.&lt;/p&gt;

&lt;p&gt;A managed language adds four problems on top of that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The garbage collector.&lt;/strong&gt; Most collectors stop every thread at some point, if only to read their stacks. For a few milliseconds your control loop simply doesn't exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Allocation.&lt;/strong&gt; Every &lt;code&gt;new&lt;/code&gt; adds work for the collector, and an allocating thread can be told to wait while it catches up. String concatenation, boxing an &lt;code&gt;int&lt;/code&gt; into an &lt;code&gt;Integer&lt;/code&gt; and collections of boxed numbers all allocate where you don't see it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The JIT.&lt;/strong&gt; On a JVM, the first few thousand runs of your loop are interpreted, then compiled, sometimes thrown away and compiled again. Each of those moments costs time you didn't budget for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden slow paths.&lt;/strong&gt; Initializing a class on first use, building a stack trace for an exception, a page fault on memory touched for the first time. All legal Java, all disastrous in a 1 ms budget.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then there's &lt;strong&gt;priority inversion&lt;/strong&gt;, which hits every language: a low priority thread holds a lock the real-time thread needs, a medium priority thread preempts the holder, and the real-time thread waits on something that isn't even running.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we solve it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IFRCCiAgICBBW1lvdXIgUmVhbHRpbWVUYXNrXSAtLT4gQntCdWlsZCB0aW1lfQogICAgQiAtLT58bmV3LCBhcnJheXMsIGJveGluZywgc3RyaW5nIGNvbmNhdCBpbiBjeWNsZXwgWFtCdWlsZCBmYWlscywgbmFtZXMgbWV0aG9kIGFuZCBsaW5lXQogICAgQiAtLT58Y2xlYW58IENbUGFycGFyVk06IGFoZWFkLW9mLXRpbWUgQywgbm8gSklUXQogICAgQyAtLT4gRFtTQ0hFRF9GSUZPIHRocmVhZCwgcGlubmVkIGNvcmUsIG1sb2NrXQogICAgRCAtLT4gRXtFdmVyeSBwZXJpb2R9CiAgICBFIC0tPiBGW2N5Y2xlIHJ1bnMgb24gYW4gYWJzb2x1dGUgY2xvY2tdCiAgICBHW0dhcmJhZ2UgY29sbGVjdG9yXSAtLi0-fHJlbGVhc2VzIFJUIHRocmVhZCBhdCBzdGFjayBzY2FuLCBubyBzdG9wLXRoZS13b3JsZCBwaGFzZXN8IEYKICAgIEYgLS0-fGFsbG9jYXRpb24gdGhlIGJ1aWxkIGNvdWxkIG5vdCBzZWV8IFlbUmVhbHRpbWVBbGxvY2F0aW9uRXJyb3IsIHRocmVhZCBmYWlscyBzYWZlbHld%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IFRCCiAgICBBW1lvdXIgUmVhbHRpbWVUYXNrXSAtLT4gQntCdWlsZCB0aW1lfQogICAgQiAtLT58bmV3LCBhcnJheXMsIGJveGluZywgc3RyaW5nIGNvbmNhdCBpbiBjeWNsZXwgWFtCdWlsZCBmYWlscywgbmFtZXMgbWV0aG9kIGFuZCBsaW5lXQogICAgQiAtLT58Y2xlYW58IENbUGFycGFyVk06IGFoZWFkLW9mLXRpbWUgQywgbm8gSklUXQogICAgQyAtLT4gRFtTQ0hFRF9GSUZPIHRocmVhZCwgcGlubmVkIGNvcmUsIG1sb2NrXQogICAgRCAtLT4gRXtFdmVyeSBwZXJpb2R9CiAgICBFIC0tPiBGW2N5Y2xlIHJ1bnMgb24gYW4gYWJzb2x1dGUgY2xvY2tdCiAgICBHW0dhcmJhZ2UgY29sbGVjdG9yXSAtLi0-fHJlbGVhc2VzIFJUIHRocmVhZCBhdCBzdGFjayBzY2FuLCBubyBzdG9wLXRoZS13b3JsZCBwaGFzZXN8IEYKICAgIEYgLS0-fGFsbG9jYXRpb24gdGhlIGJ1aWxkIGNvdWxkIG5vdCBzZWV8IFlbUmVhbHRpbWVBbGxvY2F0aW9uRXJyb3IsIHRocmVhZCBmYWlscyBzYWZlbHld%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="635" height="1212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each problem gets its own answer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No JIT.&lt;/strong&gt; Codename One already compiles your Java ahead of time to C through ParparVM. The code that runs in period one is the code that runs in period one million.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The collector never stops a real-time thread.&lt;/strong&gt; An ordinary thread pauses for a moment while the collector reads its stack. A real-time thread is released immediately, and its references stay visible to the collector through the write barrier. While any real-time thread runs, the collector never enters its stop-the-world phases. This only works because we own the VM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Allocation fails the build.&lt;/strong&gt; The translator follows every call &lt;code&gt;cycle()&lt;/code&gt; can make and fails the build on &lt;code&gt;new&lt;/code&gt;, array creation, boxing and string concatenation, naming the method and the line. An allocation you mean to make, on a fault path for example, gets &lt;code&gt;@AllocationAllowed&lt;/code&gt;. Anything the build can't see, like a call through an interface with several implementations, is caught at run time and stops the thread with a &lt;code&gt;RealtimeAllocationError&lt;/code&gt;. Catching that error doesn't switch the check off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Priority inheritance.&lt;/strong&gt; Monitors use priority-inheriting mutexes on Linux, so a low priority lock holder is raised until it lets go. Better still, hand data across through preallocated buffers and &lt;code&gt;java.util.concurrent.atomic&lt;/code&gt;, and don't share a lock at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory and cores.&lt;/strong&gt; &lt;code&gt;Realtime.lockMemory()&lt;/code&gt; locks the process into RAM so nothing pages out mid-cycle. Pinning a thread to a core moves the process's other threads off it by default. &lt;code&gt;Realtime.setMemoryLimit()&lt;/code&gt; caps the process's resident memory. Real-time threads are exempt because they don't allocate, so a leak in the UI makes an ordinary allocation fail fast instead of slowing everything down while the collector struggles.&lt;/p&gt;

&lt;h2&gt;
  
  
  The code
&lt;/h2&gt;

&lt;p&gt;Here's a 1 kHz motor loop. Everything it needs is allocated before the first period, &lt;code&gt;setup()&lt;/code&gt; may allocate, and &lt;code&gt;cycle()&lt;/code&gt; may not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MotorLoop&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;RealtimeTask&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;gains&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;PwmChannel&lt;/span&gt; &lt;span class="n"&gt;pwm&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;pwm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openPwm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;cycle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;gains&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;pwm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDutyCycle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// no allocation on this path&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;periodsMissed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// the loop overran; hold the output, count it, alarm if it persists&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;RealtimeThread&lt;/span&gt; &lt;span class="n"&gt;loop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Realtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"motor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RealtimeParameters&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setPeriodNanos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;// 1 kHz&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setPriority&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;// SCHED_FIFO 1..99&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setCpu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                &lt;span class="c1"&gt;// pin to core 3&lt;/span&gt;
        &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;MotorLoop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details there are worth a second look. The period runs on an absolute clock, so it doesn't drift with the time &lt;code&gt;cycle()&lt;/code&gt; takes. And when the loop overruns, you get &lt;code&gt;periodsMissed(n)&lt;/code&gt; instead of a burst of late cycles trying to catch up, which is what you want from a motor: hold, don't lurch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trust the numbers, not the promise
&lt;/h2&gt;

&lt;p&gt;The guide's advice is the same as mine: don't believe a real-time claim until you've measured it on your board under load. Every thread keeps statistics for exactly that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;RealtimeStatistics&lt;/span&gt; &lt;span class="n"&gt;stats&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getStatistics&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;p&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"scheduling applied: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSchedulingApplied&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;p&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"p99.99 latency ns: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLatencyPercentileNanos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.9999&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;p&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get cycles, missed periods, maximum and mean release latency, execution time, allocation violations and a 16 bucket latency histogram. Log &lt;code&gt;isSchedulingApplied()&lt;/code&gt; at startup too. A loop that silently runs at normal priority because the service lacks &lt;code&gt;CAP_SYS_NICE&lt;/code&gt; looks perfect on the bench and misses deadlines in the field. If you'd rather fail loudly, &lt;code&gt;setSchedulingRequired(true)&lt;/code&gt; does that.&lt;/p&gt;

&lt;p&gt;I'm not publishing latency figures here on purpose. Latency on PREEMPT_RT is set by the kernel and the hardware, and a number from our CI runner says nothing about your board. CI does run a 1 kHz loop while the main thread allocates as hard as it can, and fails if a release is ever late beyond a bound. Run the same check (&lt;code&gt;vm/backend/demo/rtcheck&lt;/code&gt; in the repository) on your own hardware and you'll have a number that means something.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this goes next
&lt;/h2&gt;

&lt;p&gt;On a phone, in the simulator or on desktop, the same task runs on an ordinary thread without guarantees, so you can develop and test the logic anywhere. On Linux with PREEMPT_RT and the right capabilities, the collector stops getting in the way. The kernel still sets the latency.&lt;/p&gt;

&lt;p&gt;This is the lightweight end of real time: firm deadlines on a general purpose OS. The next level is hard real time on a proper RTOS, with certification. We don't see a blocker in the design, but hard real time with certification is a big investment, and it only makes sense with a customer behind it. If you build products that need it, I want to hear from you.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/realtime/" rel="noopener noreferrer"&gt;real-time chapter&lt;/a&gt; has the full API, the parameters, what each platform supports and how to set up a board.&lt;/p&gt;

&lt;p&gt;Tomorrow: &lt;a href="https://www.codenameone.com/blog/codename-one-on-xbox/" rel="noopener noreferrer"&gt;Packaging Java Apps for Xbox Developer Mode, and Why Consoles Need Help&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Pulse: Heart Rate Zones From the Watch to the Trainer's Screen</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Sun, 15 Nov 2026 15:51:55 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/pulse-heart-rate-zones-from-the-watch-to-the-trainers-screen-548b</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/pulse-heart-rate-zones-from-the-watch-to-the-trainers-screen-548b</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fafi210jjr2t6062lz67a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fafi210jjr2t6062lz67a.jpg" alt="Pulse: a member's home screen and a trainer's live heart rate view" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A spin class with a screen on the wall showing every rider's heart rate zone is the kind of feature studios pay a lot for. It usually means a vendor's hardware, a vendor's app and a monthly fee per location. Underneath, it's three hard integrations: reading a watch or a chest strap in real time, getting that reading off the phone fast enough to matter, and doing it on iOS and Android, which store health data in two completely different places.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Pulse is a studio template where that's already done, in one Java project you own the source of. The member's phone records the class, the trainer's phone shows the room. You can generate it from the &lt;a href="https://www.codenameone.com/initializr/" rel="noopener noreferrer"&gt;Initializr&lt;/a&gt; as &lt;em&gt;Fitness studio&lt;/em&gt;, under your own name and package, and the source is MIT-0.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/pulse-phone-trainer.mp4" rel="noopener noreferrer"&gt;Download the trainer video&lt;/a&gt;.

&lt;h2&gt;
  
  
  From the wrist to the wall
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBXW0FwcGxlIFdhdGNoIG9yIFdlYXIgT1M8YnIvPnZpYSBIZWFsdGhLaXQgLyBIZWFsdGggQ29ubmVjdF0gLS0-IFNbV29ya291dCBzZXNzaW9uPGJyLz5vbiB0aGUgbWVtYmVyJ3MgcGhvbmVdCiAgICBIW0JsdWV0b290aCBjaGVzdCBzdHJhcDxici8-SGVhcnQgUmF0ZSBwcm9maWxlXSAtLT4gUwogICAgUyAtLT58bGF0ZXN0IGJlYXR8IEJbKFB1bHNlIGJhY2tlbmQ8YnIvPkhlYXJ0UmF0ZXMsIGluIG1lbW9yeSldCiAgICBCIC0tPnx6b25lIDEgdG8gNSwgbGl2ZSBjaGFubmVsfCBUW1RyYWluZXIncyBwaG9uZV0KICAgIFMgLS0-fHNhdmVkIHdvcmtvdXR8IEtbSGVhbHRoS2l0IC8gSGVhbHRoIENvbm5lY3RdCiAgICBLIC0tPnxoaXN0b3J5fCBQW1Zpc2l0cywgbWludXRlcywgcG9pbnRzXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBXW0FwcGxlIFdhdGNoIG9yIFdlYXIgT1M8YnIvPnZpYSBIZWFsdGhLaXQgLyBIZWFsdGggQ29ubmVjdF0gLS0-IFNbV29ya291dCBzZXNzaW9uPGJyLz5vbiB0aGUgbWVtYmVyJ3MgcGhvbmVdCiAgICBIW0JsdWV0b290aCBjaGVzdCBzdHJhcDxici8-SGVhcnQgUmF0ZSBwcm9maWxlXSAtLT4gUwogICAgUyAtLT58bGF0ZXN0IGJlYXR8IEJbKFB1bHNlIGJhY2tlbmQ8YnIvPkhlYXJ0UmF0ZXMsIGluIG1lbW9yeSldCiAgICBCIC0tPnx6b25lIDEgdG8gNSwgbGl2ZSBjaGFubmVsfCBUW1RyYWluZXIncyBwaG9uZV0KICAgIFMgLS0-fHNhdmVkIHdvcmtvdXR8IEtbSGVhbHRoS2l0IC8gSGVhbHRoIENvbm5lY3RdCiAgICBLIC0tPnxoaXN0b3J5fCBQW1Zpc2l0cywgbWludXRlcywgcG9pbnRzXQ%3D%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="1100" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a member checks into a class, the app asks for permission once, then opens a workout session that collects heart rate. On iOS that's a HealthKit workout, which also brings in a paired Apple Watch; on Android it's Health Connect. It's the same code on both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Health&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getStore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;requestAuthorization&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nc"&gt;HealthAccess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;WORKOUT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nc"&gt;HealthAccess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nc"&gt;HealthAccess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;asked&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;refused&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;WorkoutConfiguration&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WorkoutConfiguration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setActivityType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;WorkoutActivityType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;CYCLING&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Morning Spin"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addCollectedType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;Health&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getWorkouts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startSession&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;workout&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;workoutListener&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nf"&gt;pairStrap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Chest straps over Bluetooth
&lt;/h2&gt;

&lt;p&gt;Plenty of members train with a chest strap instead of a watch, and the strap is more accurate anyway. Every strap on the market speaks the standard Bluetooth Heart Rate profile, so Pulse scans for that profile, connects to the first one it finds and feeds it into the same workout session, which means the strap's beats end up in the member's health history too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;HealthSensors&lt;/span&gt; &lt;span class="n"&gt;sensors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Health&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getSensors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;sensors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startScan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SensorScanSettings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthSensorProfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setTimeoutMillis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SensorDiscoveryListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;sensorDiscovered&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthSensor&lt;/span&gt; &lt;span class="n"&gt;sensor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;SensorSessionOptions&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SensorSessionOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setAutoReconnect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setWorkoutSession&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;sensors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sensor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;HealthSensorProfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strap&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="n"&gt;strap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strapListener&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                    &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;scanFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthException&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Auto reconnect matters more than it looks. A strap drops off for a second whenever someone wipes their chest, and you don't want the trainer's screen to lose them for the rest of the class.&lt;/p&gt;

&lt;p&gt;A strap reports every beat. A watch, through the platform, reports running statistics instead, so Pulse reads whichever one it has:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;sensorSample&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SensorSession&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;HealthSample&lt;/span&gt; &lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nc"&gt;QuantitySample&lt;/span&gt;
            &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;equals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;beat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nc"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;QuantitySample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthUnit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;COUNT_PER_MINUTE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;workoutStatisticsUpdated&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;WorkoutSession&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;HealthDataType&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;HealthQuantity&lt;/span&gt; &lt;span class="n"&gt;average&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getStatistic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;HEART_RATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nc"&gt;AggregateMetric&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;AVERAGE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;average&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;beat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nc"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;average&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthUnit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;COUNT_PER_MINUTE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Zones on the trainer's screen
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;beat()&lt;/code&gt; sends the reading to the studio's backend. The server keeps only the latest reading per member, in memory, and turns it into a zone: the reading's share of 220 minus the member's age, in fifths starting at 50%. Zone 1 is a warm-up, zone 5 is everything they've got. The trainer's phone gets the zones over a live channel, so the room view updates as people push, and a trainer can see who's coasting and who needs to back off.&lt;/p&gt;

&lt;p&gt;Individual readings are never written to the database. A reading matters for a few seconds; the workout, which is kept, arrives whole when the class ends, and it's also saved to the member's own HealthKit or Health Connect store.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading history back
&lt;/h2&gt;

&lt;p&gt;Past workouts, including ones recorded by other apps, feed the member's progress screen. One query works on both platforms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;SampleQuery&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SampleQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthDataType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;WORKOUT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setTimeRange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HealthTimeRange&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lastDays&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setLimit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setSortDescending&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;Health&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getStore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readSamples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// turn workouts into visits, minutes and points&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Workouts become points, streaks and badges, and friends can send kudos, which is the part that keeps people coming back in January.&lt;/p&gt;

&lt;h2&gt;
  
  
  Health data is regulated data
&lt;/h2&gt;

&lt;p&gt;Heart rate is health data. In the EU it's special-category data under GDPR, in the US it can fall under HIPAA depending on who holds it, and Apple and Google both have their own rules for apps that read HealthKit or Health Connect, including what you may store and what you must disclose. Pulse is built to stay on the right side of that by default: it asks only for the types it uses and keeps live readings out of the database. The &lt;a href="https://www.codenameone.com/developer-guide/pulse-implementors-guide/" rel="noopener noreferrer"&gt;implementor's guide&lt;/a&gt; lists what you still have to do yourself before you ship, and you should read that part with whoever handles your privacy policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rest of the studio
&lt;/h2&gt;

&lt;p&gt;Health is the part this post is about, but Pulse is a whole studio app. The server decides which roles an account has, so the same install becomes a member app at home and a trainer app on the coach's phone:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBCWyhQdWxzZSBiYWNrZW5kPGJyLz5ib29raW5ncywgYmlsbGluZywgcG9pbnRzKV0gLS0tIE1bTWVtYmVyPGJyLz5ib29rLCBwYXNzLCB3b3Jrb3V0cywgZnJpZW5kc10KICAgIEIgLS0tIFRbVHJhaW5lcjxici8-bGl2ZSBjbGFzcywgcm9zdGVyLCBsZWFkZXJib2FyZF0KICAgIEIgLS0tIERbRnJvbnQgZGVzazxici8-dGFibGV0IGtpb3NrLCBjaGVjay1pbl0KICAgIEIgLS0tIE9bT3duZXI8YnIvPnJldmVudWUsIHV0aWxpc2F0aW9uLCBjYW1wYWlnbnNd%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBCWyhQdWxzZSBiYWNrZW5kPGJyLz5ib29raW5ncywgYmlsbGluZywgcG9pbnRzKV0gLS0tIE1bTWVtYmVyPGJyLz5ib29rLCBwYXNzLCB3b3Jrb3V0cywgZnJpZW5kc10KICAgIEIgLS0tIFRbVHJhaW5lcjxici8-bGl2ZSBjbGFzcywgcm9zdGVyLCBsZWFkZXJib2FyZF0KICAgIEIgLS0tIERbRnJvbnQgZGVzazxici8-dGFibGV0IGtpb3NrLCBjaGVjay1pbl0KICAgIEIgLS0tIE9bT3duZXI8YnIvPnJldmVudWUsIHV0aWxpc2F0aW9uLCBjYW1wYWlnbnNd%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="372" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Members&lt;/strong&gt; book classes, join waitlists, add their kids to a household, and walk in with a door pass: a QR code that rotates, so an old screenshot stops working, or an NFC tap.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/pulse-phone-member.mp4" rel="noopener noreferrer"&gt;Download the member video&lt;/a&gt;.

&lt;p&gt;&lt;strong&gt;Owners&lt;/strong&gt; get the desktop from the same codebase: takings, busy hours, under-filled classes, members who are about to churn, plans and pricing, campaigns, staff shifts and billing with a dunning ladder for failed cards.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/pulse-desktop-owner.mp4" rel="noopener noreferrer"&gt;Download the owner video&lt;/a&gt;.

&lt;h2&gt;
  
  
  Try it in two commands
&lt;/h2&gt;

&lt;p&gt;The simulator has no watch or strap, so the dev backend plays demo heart rates into the live view. It runs in a dev profile with an in-memory database, text messages and pushes printed to the console and simulated card payments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CN1_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dev backend/server.sh run
mvn verify -Psimulator -DskipTests -Dcodename1.platform=javase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Log in with the demo accounts from the guide (&lt;code&gt;owner@pulse.example&lt;/code&gt;, &lt;code&gt;trainer@pulse.example&lt;/code&gt;, &lt;code&gt;desk@pulse.example&lt;/code&gt;) to see each role.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/pulse-users-guide/" rel="noopener noreferrer"&gt;user's guide&lt;/a&gt; walks through every screen, and the &lt;a href="https://www.codenameone.com/developer-guide/pulse-implementors-guide/" rel="noopener noreferrer"&gt;implementor's guide&lt;/a&gt; explains billing, the door pass, health and what to change to make it your studio's app.&lt;/p&gt;

&lt;p&gt;Tomorrow: &lt;a href="https://www.codenameone.com/blog/real-time-java-control-loops/" rel="noopener noreferrer"&gt;Real-Time Java: Control Loops the Garbage Collector Never Stops&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Dash: An Endless Runner That Races Through Your City</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Sat, 14 Nov 2026 15:29:35 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/dash-an-endless-runner-that-races-through-your-city-57o7</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/dash-an-endless-runner-that-races-through-your-city-57o7</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi9ebvugu2k85jqqls9kt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi9ebvugu2k85jqqls9kt.jpg" alt="Dash: a route picked on a city map and the same route as a 3D run" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codenameone.com/blog/build-a-multiplayer-strategy-game-in-java/" rel="noopener noreferrer"&gt;Skirmish&lt;/a&gt; showed that most of a mobile game is app: the sign-in, the menus, the shop, the friends list, the pushes and the server. Dash is the second game template, and it is a different kind of game: an endless runner. A runner dashes down a track of lanes, jumps hurdles, slides under barriers and changes lanes around traffic. You can generate it from the &lt;a href="https://www.codenameone.com/initializr/" rel="noopener noreferrer"&gt;Initializr&lt;/a&gt; today, under your own name and package, and the source is MIT-0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/dash-promo-tour.mp4" rel="noopener noreferrer"&gt;Download the Dash tour&lt;/a&gt;.

&lt;h2&gt;
  
  
  A level that turns into 3D
&lt;/h2&gt;

&lt;p&gt;The trick I like most in Dash is that a level can start as a side-scroller and become a 3D runner halfway through. The first stretch of &lt;em&gt;Neon Causeway&lt;/em&gt; looks like a flat platformer: one row of hurdles and barriers, seen from the side. At 300 meters the camera swings behind the runner, the lanes open up, and the rest is a chase-camera runner.&lt;/p&gt;

&lt;p&gt;There is no second game behind that. The simulation always has lanes, heights and distances, and a hurdle is cleared the same way from either angle. A level only carries &lt;em&gt;camera cues&lt;/em&gt;, and the renderer blends between the two framings when the runner reaches one. Because the rules never see the camera, a level can change its view anywhere without changing who wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run your own street
&lt;/h2&gt;

&lt;p&gt;This is my favorite part to demo. Tap &lt;em&gt;Run your city&lt;/em&gt;, pick a start and a finish on a real street map, and the route becomes a level. Every street is a stretch of track, every turn is a corner on the side it turns to, and the next street's name is called out before you reach it. Landmarks along the way, a station or a museum, show up as boards beside the track.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fdash-city-route.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1732" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fdash-city-route.png" alt="A route picked on the street map, with the landmarks along it pinned"&gt;&lt;/a&gt;Pick two points.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fdash-city-run.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1732" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fdash-city-run.png" alt="The run down Cannon Street, with the street name under the score and the route map"&gt;&lt;/a&gt;Run the streets.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fdash-city-landmark.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="1732" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fdash-city-landmark.png" alt="A landmark's board beside the track as the runner passes it"&gt;&lt;/a&gt;Pass the landmarks.&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The map is Codename One's &lt;code&gt;MapView&lt;/code&gt;, which draws OpenStreetMap data itself on every platform, and the route comes from &lt;code&gt;Routing&lt;/code&gt;. The app reduces the route to streets and turns and hands it to the rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;CityRoute&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CityRoute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Old Harbour"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;420&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CityRoute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;STRAIGHT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Quay Street"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;310&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CityRoute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;LEFT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Rope Walk"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;LevelDef&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;level()&lt;/code&gt; is deterministic, so the server doesn't need a map. It rebuilds the same level from the encoded route and checks your run against it. The level's id is a hash of the route, so every route gets its own leaderboard, and nobody can trim a hard route into an easy one and keep the same board.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leaderboards you can trust
&lt;/h2&gt;

&lt;p&gt;A run is never reported as a number. The app sends the seed and the input log, a few hundred bytes, and the server plays it through the same Java rules module the app runs. A typed-in score, or a log edited to dodge an obstacle the player hit, does not reproduce. The rules use no floating point and no clock, so the phone, the server and the replay viewer agree to the bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2Fc2VxdWVuY2VEaWFncmFtCiAgICBwYXJ0aWNpcGFudCBQIGFzIFBob25lCiAgICBwYXJ0aWNpcGFudCBTIGFzIFNlcnZlcgogICAgUC0-PlA6IFJ1biBvbiBzZWVkICsgcnVsZXMgbW9kdWxlCiAgICBQLT4-UzogU2VlZCArIGlucHV0IGxvZyAoYSBmZXcgaHVuZHJlZCBieXRlcykKICAgIFMtPj5TOiBSZXBsYXkgdGhlIGxvZyBvbiB0aGUgc2FtZSBydWxlcwogICAgYWx0IFJlcGxheSBtYXRjaGVzCiAgICAgICAgUy0-PlM6IFBvc3Qgc2NvcmUgdG8gYWxsLXRpbWUsIHdlZWtseSwgZnJpZW5kcyBhbmQgY3JldyBib2FyZHMKICAgICAgICBTLS0-PlA6IFB1c2ggdG8gdGhlIGZyaWVuZCB5b3UganVzdCBiZWF0CiAgICBlbHNlIEVkaXRlZCBsb2cgb3IgdHlwZWQtaW4gc2NvcmUKICAgICAgICBTLS0-PlA6IFJlamVjdGVkLCBpdCBkb2Vzbid0IHJlcHJvZHVjZQogICAgZW5k%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2Fc2VxdWVuY2VEaWFncmFtCiAgICBwYXJ0aWNpcGFudCBQIGFzIFBob25lCiAgICBwYXJ0aWNpcGFudCBTIGFzIFNlcnZlcgogICAgUC0-PlA6IFJ1biBvbiBzZWVkICsgcnVsZXMgbW9kdWxlCiAgICBQLT4-UzogU2VlZCArIGlucHV0IGxvZyAoYSBmZXcgaHVuZHJlZCBieXRlcykKICAgIFMtPj5TOiBSZXBsYXkgdGhlIGxvZyBvbiB0aGUgc2FtZSBydWxlcwogICAgYWx0IFJlcGxheSBtYXRjaGVzCiAgICAgICAgUy0-PlM6IFBvc3Qgc2NvcmUgdG8gYWxsLXRpbWUsIHdlZWtseSwgZnJpZW5kcyBhbmQgY3JldyBib2FyZHMKICAgICAgICBTLS0-PlA6IFB1c2ggdG8gdGhlIGZyaWVuZCB5b3UganVzdCBiZWF0CiAgICBlbHNlIEVkaXRlZCBsb2cgb3IgdHlwZWQtaW4gc2NvcmUKICAgICAgICBTLS0-PlA6IFJlamVjdGVkLCBpdCBkb2Vzbid0IHJlcHJvZHVjZQogICAgZW5k%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="694" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every level has all-time, weekly, daily, friends and crew boards. Beat a friend's best and they get a push that opens that level's board.&lt;/p&gt;

&lt;h2&gt;
  
  
  Racing your friends
&lt;/h2&gt;

&lt;p&gt;Open a party, share the link, and everyone runs the same track at the same moment. The server runs the race in lockstep: each phone sends its inputs, the room broadcasts each tick's inputs to every seat, and its own copy of the race decides the places. A client whose state drifts from the server's is caught by a hash it sends every second.&lt;/p&gt;

&lt;p&gt;While you race you can talk. Voice uses Codename One's WebRTC API, peer to peer between each pair of players, with the game's own socket carrying the signalling. The server never touches the audio.&lt;/p&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/dash-gameplay-clip.mp4" rel="noopener noreferrer"&gt;Download the gameplay clip&lt;/a&gt;.

&lt;h2&gt;
  
  
  Build your own levels
&lt;/h2&gt;

&lt;p&gt;The track editor is in the app, on every platform. A level is a strip you paint on: tap a lane to drop a hurdle or a coin, tap the top row for a barrier across every lane, and drop camera cues where the view should change. &lt;em&gt;Playtest&lt;/em&gt; runs the draft on the real rules. Publishing requires the bot to finish the level, so nobody can publish one that cannot be beaten. Published packs can be rated, raced, remixed and moderated from the admin console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get it
&lt;/h2&gt;

&lt;p&gt;Choose &lt;strong&gt;Dash&lt;/strong&gt; in the &lt;a href="https://www.codenameone.com/initializr/" rel="noopener noreferrer"&gt;Initializr&lt;/a&gt;, or read the &lt;a href="https://www.codenameone.com/developer-guide/dash-implementors-guide/" rel="noopener noreferrer"&gt;guide chapter&lt;/a&gt; first. It walks through the rules, the camera, the referee, races, voice and the editor, and what to change to make the game yours.&lt;/p&gt;

&lt;p&gt;If you've ever wanted to ship a game but stalled on everything around the game, this is the part I'd copy. Sign-in, friends, pushes, a shop, moderation and a server that replays every run are already done, so the week you spend is on the fun part.&lt;/p&gt;

&lt;p&gt;Tomorrow: &lt;a href="https://www.codenameone.com/blog/launch-your-own-gym-app/" rel="noopener noreferrer"&gt;Pulse: Heart Rate Zones From the Watch to the Trainer's Screen&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Embedded Java: 20x Smaller Than Chrome, Faster Than Rust, Royalty Free</title>
      <dc:creator>Shai Almog</dc:creator>
      <pubDate>Fri, 13 Nov 2026 14:35:42 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/codenameone/embedded-java-20x-smaller-than-chrome-faster-than-rust-royalty-free-59p8</link>
      <guid>https://dev.clauneck.workers.dev/codenameone/embedded-java-20x-smaller-than-chrome-faster-than-rust-royalty-free-59p8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F10709h6sl6xp0y318fpk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F10709h6sl6xp0y318fpk.jpg" alt="Embedded Java: 20x smaller than Chrome, faster than Rust" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Embedded software has the hardest job description in our industry. It has to run for years without a reboot. It has to fit in whatever RAM and flash the bill of materials allowed, because every chip you add is paid for again on every unit you ship. It has to respond instantly on a CPU slower than a phone from five years ago. And now it also has to look like the phone app, talk to the phone app, and report to a cloud service, because that's what customers expect from anything with a power cord.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Codename One?&lt;/strong&gt; Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at &lt;a href="https://www.codenameone.com/" rel="noopener noreferrer"&gt;codenameone.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Most teams solve that with three or four stacks. C or C++ on the device for size and control, a browser or Qt for the screen, Swift and Kotlin for the companion app, something else on the server. Every boundary between them is a protocol written twice and a bug waiting to happen.&lt;/p&gt;

&lt;p&gt;Codename One now runs on embedded Linux, and it covers every one of those pieces with one Java or Kotlin codebase. On our benchmark, the UI drew an animated gauge in &lt;strong&gt;18 MB of memory with no GPU&lt;/strong&gt;, about a twentieth of what a Chromium kiosk needed to draw the same thing. The headless backend served &lt;strong&gt;379,900 requests per second on two cores, 1.3 times Rust's &lt;code&gt;axum&lt;/code&gt;&lt;/strong&gt;. And we don't charge royalties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming This Week
&lt;/h2&gt;

&lt;p&gt;Today is the embedded story. Then one post a day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Saturday, November 7:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/build-an-endless-runner-in-java/" rel="noopener noreferrer"&gt;Dash: An Endless Runner That Races Through Your City&lt;/a&gt;. A game template that turns from 2D into 3D mid-run, builds levels from real streets, and lets friends race with voice chat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sunday, November 8:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/launch-your-own-gym-app/" rel="noopener noreferrer"&gt;Pulse: Heart Rate Zones From the Watch to the Trainer's Screen&lt;/a&gt;. A gym and studio template built around HealthKit, Health Connect and Bluetooth heart rate straps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monday, November 9:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/real-time-java-control-loops/" rel="noopener noreferrer"&gt;Real-Time Java: Control Loops the Garbage Collector Never Stops&lt;/a&gt;. What real time means, why it's hard for a managed language, and how we do it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tuesday, November 10:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/codename-one-on-xbox/" rel="noopener noreferrer"&gt;Packaging Java Apps for Xbox Developer Mode, and Why Consoles Need Help&lt;/a&gt;. One build hint today. Shipping to consoles needs help we can't get alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wednesday, November 11:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/cn1libs-with-a-server-side/" rel="noopener noreferrer"&gt;Port Your Spring Code With Fewer Edits, and Libraries That Bring Their Own Server&lt;/a&gt;. Logging, typed JSON, CORS, content negotiation and more of the JDK in the backend, plus cn1libs with a server half.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thursday, November 12:&lt;/strong&gt; &lt;a href="https://www.codenameone.com/blog/debug-dart-in-a-java-debugger/" rel="noopener noreferrer"&gt;Debug Your Dart in a Java Debugger, and JFX Central on a Phone&lt;/a&gt;. Dart call stacks, Flutter fixes from a real port, a faster web port and a real JavaFX app on an iPhone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://www.codenameone.com/blog/build-an-endless-runner-in-java/" rel="noopener noreferrer"&gt;&lt;img width="420" height="908" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fblog%2Frelease-2026-11-06%2Fdash-promo-tour-poster.jpg" alt="Dash running in 3D on a neon track"&gt;&lt;/a&gt;Dash, mid-run in 3D.&lt;br&gt;
&lt;a href="https://www.codenameone.com/blog/launch-your-own-gym-app/" rel="noopener noreferrer"&gt;&lt;img width="420" height="746" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fblog%2Frelease-2026-11-06%2Fpulse-phone-trainer-poster.jpg" alt="Pulse showing live heart rate zones for a class"&gt;&lt;/a&gt;Pulse's live class view.&lt;br&gt;
&lt;a href="https://www.codenameone.com/blog/debug-dart-in-a-java-debugger/" rel="noopener noreferrer"&gt;&lt;img width="420" height="914" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fblog%2Frelease-2026-11-06%2FJFXCentral-demo-poster.jpg" alt="JFX Central running on an iPhone"&gt;&lt;/a&gt;JFX Central on an iPhone.&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Two flavors, two kinds of product
&lt;/h2&gt;

&lt;p&gt;The port comes in two flavors. The easiest way to explain them is with two products.&lt;/p&gt;

&lt;h3&gt;
  
  
  A point of sale terminal: the UI flavor
&lt;/h3&gt;

&lt;p&gt;A POS terminal lives or dies on price. It needs a responsive touch screen, a receipt printer on a serial port, a card reader, and it has to sync with the store's back office. The merchant buys a hundred of them, so ten dollars of hardware is a thousand dollars on the order and the difference between winning and losing the deal.&lt;/p&gt;

&lt;p&gt;A GPU is one of the first things you'd like to cut. Android won't let you: AOSP needs a board support package with a GPU driver. Flutter can limp along without one, if Mesa emulates OpenGL on the CPU, and on our gauge that took 1.4 CPU cores and 112 MB. A Chromium kiosk runs in 400 MB of RAM. Codename One draws in software by default, through DRM/KMS or the Linux frame buffer, with no X11 or Wayland. It needs nothing from the board but a frame buffer, so the cheapest SoC that drives your screen is enough.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBzdWJncmFwaCBUW1BPUyB0ZXJtaW5hbCwgbm8gR1BVXQogICAgICAgIFVbQ29kZW5hbWUgT25lIFVJPGJyLz5zb2Z0d2FyZSByZW5kZXJlcl0gLS0-IEZbRnJhbWUgYnVmZmVyXQogICAgICAgIFUgLS0-IFBbUmVjZWlwdCBwcmludGVyPGJyLz5zZXJpYWwgcG9ydF0KICAgICAgICBVIC0tPiBSW0NhcmQgcmVhZGVyPGJyLz5ORkMgLyBVU0JdCiAgICBlbmQKICAgIFUgLS0-fHNoYXJlZCBEVE9zLCBSRVNUfCBDW0JhY2sgb2ZmaWNlIGJhY2tlbmRdCiAgICBNW01hbmFnZXIncyBwaG9uZSBhcHBdIC0tPnxzYW1lIERUT3N8IEM%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBzdWJncmFwaCBUW1BPUyB0ZXJtaW5hbCwgbm8gR1BVXQogICAgICAgIFVbQ29kZW5hbWUgT25lIFVJPGJyLz5zb2Z0d2FyZSByZW5kZXJlcl0gLS0-IEZbRnJhbWUgYnVmZmVyXQogICAgICAgIFUgLS0-IFBbUmVjZWlwdCBwcmludGVyPGJyLz5zZXJpYWwgcG9ydF0KICAgICAgICBVIC0tPiBSW0NhcmQgcmVhZGVyPGJyLz5ORkMgLyBVU0JdCiAgICBlbmQKICAgIFUgLS0-fHNoYXJlZCBEVE9zLCBSRVNUfCBDW0JhY2sgb2ZmaWNlIGJhY2tlbmRdCiAgICBNW01hbmFnZXIncyBwaG9uZSBhcHBdIC0tPnxzYW1lIERUT3N8IEM%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="828" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the board does have a GPU, set one build hint (or let the board profile choose it) and the same renderer composites through GBM, EGL and GLES 2. The frames are identical to the software output; the CPU time per frame drops. If the GPU driver turns out to be broken, the app logs why and falls back to software instead of showing a black screen.&lt;/p&gt;

&lt;p&gt;The screen code is the code you'd write for a phone. Your POS app, the manager's phone app and the back office share the same entity classes, so a change to the receipt format breaks the build rather than a store.&lt;/p&gt;

&lt;h3&gt;
  
  
  A robot vacuum: the headless flavor
&lt;/h3&gt;

&lt;p&gt;A robot vacuum needs a brain but no screen. The UI is the phone app. The device has to read its sensors, drive its motors, expose an API the app can find on the local network, accept only the owner's phone, take updates and keep working when the Wi-Fi drops. Every component inside it is multiplied by every unit sold, so memory and CPU headroom cost real money for the life of the product.&lt;/p&gt;

&lt;p&gt;That's the backend flavor: the same Codename One backend that runs your cloud server, compiled to a native executable for the board. REST endpoints, WebSockets, the ORM, MQTT, Bonjour discovery and mutual TLS for device identity are all there, next to the hardware API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBzdWJncmFwaCBWW1JvYm90IHZhY3V1bSwgaGVhZGxlc3NdCiAgICAgICAgQltDb2RlbmFtZSBPbmUgYmFja2VuZDxici8-bmF0aXZlIGV4ZWN1dGFibGVdIC0tPiBIW01vdG9ycywgYnVtcCBzZW5zb3JzLCBiYXR0ZXJ5PGJyLz5HUElPLCBJMkMsIFBXTV0KICAgICAgICBCIC0tPiBMW1JlYWwtdGltZSBtb3RvciBsb29wXQogICAgZW5kCiAgICBBW1Bob25lIGFwcF0gLS0-fEJvbmpvdXIsIHRoZW4gUkVTVCArIFdlYlNvY2tldDxici8-bXV0dWFsIFRMU3wgQgogICAgQiAtLT58b3V0Ym94IHdoZW4gb25saW5lfCBDW0Nsb3VkIGJhY2tlbmQ8YnIvPmZsZWV0LCB1cGRhdGVzXQogICAgQSAtLT58YXdheSBmcm9tIGhvbWV8IEM%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBzdWJncmFwaCBWW1JvYm90IHZhY3V1bSwgaGVhZGxlc3NdCiAgICAgICAgQltDb2RlbmFtZSBPbmUgYmFja2VuZDxici8-bmF0aXZlIGV4ZWN1dGFibGVdIC0tPiBIW01vdG9ycywgYnVtcCBzZW5zb3JzLCBiYXR0ZXJ5PGJyLz5HUElPLCBJMkMsIFBXTV0KICAgICAgICBCIC0tPiBMW1JlYWwtdGltZSBtb3RvciBsb29wXQogICAgZW5kCiAgICBBW1Bob25lIGFwcF0gLS0-fEJvbmpvdXIsIHRoZW4gUkVTVCArIFdlYlNvY2tldDxici8-bXV0dWFsIFRMU3wgQgogICAgQiAtLT58b3V0Ym94IHdoZW4gb25saW5lfCBDW0Nsb3VkIGJhY2tlbmQ8YnIvPmZsZWV0LCB1cGRhdGVzXQogICAgQSAtLT58YXdheSBmcm9tIGhvbWV8IEM%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="1250" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A controller on the vacuum is a Spring-style class that reads the hardware directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/api/robot"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RobotController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;I2cDevice&lt;/span&gt; &lt;span class="n"&gt;fuelGauge&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;RobotController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;fuelGauge&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openI2c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x36&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/battery"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;BatteryDto&lt;/span&gt; &lt;span class="nf"&gt;battery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BatteryDto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fuelGauge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readRegister&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x04&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The phone app compiles against the same &lt;code&gt;BatteryDto&lt;/code&gt;. It finds the vacuum with Bonjour when it's on the same network and goes through the cloud backend when it isn't, and the API is the same either way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Competitors that need a GPU, gigabytes and a prayer
&lt;/h2&gt;

&lt;p&gt;We ran the same workload in five toolkits: an 800 by 480 gauge with a sweeping arc, a needle and a bold percentage, redrawn every frame and capped at 60 frames per second, in software. Same Debian arm64 container, three runs each, median shown.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fembedded-gui-memory.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="358" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fembedded-gui-memory.png" alt="Memory while animating, PSS in MB: Codename One: 18, Slint 23, Qt 23, JavaFX 116, Chromium 398, flutter-pi 112"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fembedded-gui-first-frame.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="358" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fembedded-gui-first-frame.png" alt="Milliseconds to the first frame from a cold start: Codename One: 46, Slint 45, Qt 73, JavaFX 327, Chromium 717, flutter-pi 767"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Toolkit&lt;/th&gt;
&lt;th&gt;First frame, cold&lt;/th&gt;
&lt;th&gt;Frames per second&lt;/th&gt;
&lt;th&gt;Memory (PSS)&lt;/th&gt;
&lt;th&gt;On disk (files mapped)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Codename One&lt;/td&gt;
&lt;td&gt;46 ms&lt;/td&gt;
&lt;td&gt;57&lt;/td&gt;
&lt;td&gt;18 MB&lt;/td&gt;
&lt;td&gt;15 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slint 1.8&lt;/td&gt;
&lt;td&gt;45 ms&lt;/td&gt;
&lt;td&gt;51&lt;/td&gt;
&lt;td&gt;23 MB&lt;/td&gt;
&lt;td&gt;4.3 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qt 6.4 Widgets&lt;/td&gt;
&lt;td&gt;73 ms&lt;/td&gt;
&lt;td&gt;62&lt;/td&gt;
&lt;td&gt;23 MB&lt;/td&gt;
&lt;td&gt;73 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JavaFX 26&lt;/td&gt;
&lt;td&gt;327 ms&lt;/td&gt;
&lt;td&gt;62&lt;/td&gt;
&lt;td&gt;116 MB&lt;/td&gt;
&lt;td&gt;102 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chromium kiosk&lt;/td&gt;
&lt;td&gt;717 ms&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;td&gt;398 MB&lt;/td&gt;
&lt;td&gt;378 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;flutter-pi, GPU emulated on the CPU&lt;/td&gt;
&lt;td&gt;767 ms&lt;/td&gt;
&lt;td&gt;59&lt;/td&gt;
&lt;td&gt;112 MB&lt;/td&gt;
&lt;td&gt;233 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Android (AOSP)&lt;/td&gt;
&lt;td&gt;needs a GPU and a BSP&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read that table as a hardware budget. The kiosk browser, the stack most teams reach for when they want "modern UX", needs 22 times our memory and 25 times our disk to draw one gauge, and takes three quarters of a second to show it. JavaFX, the other way to put Java on a board, needs six times our memory. Flutter does run without a GPU, but only by emulating one: it held its frame rate on 1.4 CPU cores, where we used 6% of one, in six times our memory and fifteen times our disk. Android can't run without a GPU at all. We're the only Java option in the table that fits on the board you'd actually want to pay for.&lt;/p&gt;

&lt;p&gt;The container ran on an Apple Silicon Mac, not a board, so a real board will be slower. Compare the rows against each other, not against your hardware. Slint needs less disk than we do, and Qt pushes a few more frames. Our form also draws more than the others: a title bar, a button, a slider and a label around the gauge. The flutter-pi row is a release build of the same gauge drawing to the kernel's virtual display, because flutter-pi needs a display device; the others drew to memory. LVGL isn't in the table either. It's a low-level C graphics library: its widgets are drawn objects you wire up by hand, with no component model, data binding, navigation, networking or storage around them. Comparing it with a full application toolkit wouldn't be a fair test of either.&lt;/p&gt;

&lt;p&gt;The headless flavor ran its own benchmark: a small JSON service pinned to two cores.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fembedded-server-throughput.png" class="article-body-image-wrapper"&gt;&lt;img width="800" height="358" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codenameone.com%2Fdeveloper-guide%2Fimg%2Fembedded-server-throughput.png" alt="Peak JSON requests per second on two cores: Codename One: 379,930, Rust 290,204, Go 178,930, Node.js 63,488, Spring Boot 33,322, Python 6,684"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Runtime&lt;/th&gt;
&lt;th&gt;Start&lt;/th&gt;
&lt;th&gt;Idle memory&lt;/th&gt;
&lt;th&gt;Peak requests/s&lt;/th&gt;
&lt;th&gt;p99 at peak&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Codename One backend&lt;/td&gt;
&lt;td&gt;40 ms&lt;/td&gt;
&lt;td&gt;9.2 MB&lt;/td&gt;
&lt;td&gt;379,900&lt;/td&gt;
&lt;td&gt;0.22 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rust, &lt;code&gt;axum&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;35 ms&lt;/td&gt;
&lt;td&gt;1.6 MB&lt;/td&gt;
&lt;td&gt;290,200&lt;/td&gt;
&lt;td&gt;0.25 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go, &lt;code&gt;net/http&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;48 ms&lt;/td&gt;
&lt;td&gt;5.2 MB&lt;/td&gt;
&lt;td&gt;178,900&lt;/td&gt;
&lt;td&gt;0.59 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node.js&lt;/td&gt;
&lt;td&gt;147 ms&lt;/td&gt;
&lt;td&gt;48 MB&lt;/td&gt;
&lt;td&gt;63,500&lt;/td&gt;
&lt;td&gt;1.1 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spring Boot 3.5&lt;/td&gt;
&lt;td&gt;1,340 ms&lt;/td&gt;
&lt;td&gt;164 MB&lt;/td&gt;
&lt;td&gt;33,300&lt;/td&gt;
&lt;td&gt;3.3 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python, FastAPI&lt;/td&gt;
&lt;td&gt;270 ms&lt;/td&gt;
&lt;td&gt;42 MB&lt;/td&gt;
&lt;td&gt;6,700&lt;/td&gt;
&lt;td&gt;11 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Rust and Go use less memory. But a Java backend that serves 1.3 times Rust's peak at a lower p99, and starts 33 times faster than Spring Boot in an eighteenth of its memory, changes what you can put in a vacuum. Like Rust, our server makes two system calls per request and allocates nothing but the object the handler returns. CI reruns this on arm64 with every change to the backend runtime and fails the build if we fall below Rust. The &lt;a href="https://github.com/codenameone/CodenameOne/tree/master/scripts/embedded/bench" rel="noopener noreferrer"&gt;harness&lt;/a&gt; is public, so check our Rust setup.&lt;/p&gt;
&lt;h2&gt;
  
  
  The only stack that goes from the vacuum to the browser
&lt;/h2&gt;

&lt;p&gt;Here's what I think matters more than any single number. Look at what each option covers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Device UI&lt;/th&gt;
&lt;th&gt;Headless device&lt;/th&gt;
&lt;th&gt;Real-time loop&lt;/th&gt;
&lt;th&gt;iOS and Android&lt;/th&gt;
&lt;th&gt;Desktop&lt;/th&gt;
&lt;th&gt;Web&lt;/th&gt;
&lt;th&gt;Cloud backend&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Codename One&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qt&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;Qt Core&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;WebAssembly&lt;/td&gt;
&lt;td&gt;HTTP server module&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slint&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;Android, iOS preview&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;WebAssembly&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flutter (flutter-pi)&lt;/td&gt;
&lt;td&gt;GPU, or emulated on the CPU&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chromium kiosk&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;as a web app&lt;/td&gt;
&lt;td&gt;as a web app&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Android (AOSP)&lt;/td&gt;
&lt;td&gt;GPU only&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;Android only&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Nobody else gives you a device UI, a headless device, a real-time control loop, the phone app, the desktop app, the web app and the cloud server from one language, one build and one set of classes. That's the "super full stack": the entities, the DTOs and the API contract live in a &lt;code&gt;shared&lt;/code&gt; module that every target compiles against. A field renamed on the vacuum is a compile error in the phone app, not a support ticket. One team can own the whole product, and one security fix lands everywhere at once.&lt;/p&gt;

&lt;p&gt;The rest of the ecosystem comes along: Bluetooth LE, NFC, MQTT, Bonjour, the ORM, push, crash reporting and the build tools you already use for mobile.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it looks like in code
&lt;/h2&gt;

&lt;p&gt;Hardware access is in the core API. GPIO, I2C, SPI, serial, PWM, CAN, the watchdog and the backlight go through the kernel's own interfaces, with no extra library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Hardware&lt;/span&gt; &lt;span class="n"&gt;hw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSupported&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;FEATURE_GPIO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;GpioPin&lt;/span&gt; &lt;span class="n"&gt;led&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openGpioOutput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"gpiochip0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;GpioPin&lt;/span&gt; &lt;span class="n"&gt;button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openGpioInput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"gpiochip0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="nc"&gt;GpioPin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;BIAS_PULL_UP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;GpioPin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;EDGE_FALLING&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rising&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nanos&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;led&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setHigh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;led&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isHigh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;e&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSupported&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;FEATURE_I2C&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;I2cDevice&lt;/span&gt; &lt;span class="n"&gt;sensor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openI2c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x48&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;p&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Sensor reads "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;sensor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readRegister&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;e&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a phone, &lt;code&gt;isSupported&lt;/code&gt; answers false, so the same class is safe everywhere. In the simulator it runs against a virtual board with 32 GPIO lines, a TMP102 temperature sensor, an EEPROM and loopback SPI, serial, and CAN. You can write and unit test the hardware code before the board arrives.&lt;/p&gt;

&lt;p&gt;Getting it onto the board is one command. It builds, copies the executable over SSH, installs it as a systemd service and follows the log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mvn cn1:runOnDevice -Dcn1.board=rpi5 -Dcn1.device.host=pi.local -Dcn1.device.user=pi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Board profiles cover the Raspberry Pi family, i.MX 8 and i.MX 6, RK3588, Jetson, BeaglePlay and generic arm64, armv7, x64 and RISC-V. There's a Yocto layer for production images, and a cross build can point at a Yocto or Buildroot SDK sysroot.&lt;/p&gt;

&lt;h2&gt;
  
  
  No royalties, and the support embedded actually needs
&lt;/h2&gt;

&lt;p&gt;Embedded UI is usually sold per unit. You ship ten thousand terminals and pay a royalty on each one, which is fine until the product succeeds and the toolkit becomes a line item on every unit you ship.&lt;/p&gt;

&lt;p&gt;Codename One doesn't charge royalties. It's open source under GPL 2 with the Classpath exception, on devices like everywhere else.&lt;/p&gt;

&lt;p&gt;What embedded teams need from a vendor is different. A device ships once and stays in the field for ten years or more. It runs the exact framework version it was certified with, and the team needs a security fix in that version five years from now, not an upgrade to whatever master looks like then. That's long-term support: a maintained branch for your product, backports of the fixes that matter to you, and someone who answers when the board vendor's new kernel breaks something.&lt;/p&gt;

&lt;p&gt;That runs far past the timeline we normally support, and it's work we're happy to do with you directly. It's a better deal for both sides than a royalty: you pay for the support you use, and the price doesn't grow with your success. If you're planning a product, &lt;a href="https://www.codenameone.com/contact-us.html" rel="noopener noreferrer"&gt;talk to us&lt;/a&gt; early so the branch matches your release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linux today, other systems and RTOS on request
&lt;/h2&gt;

&lt;p&gt;We only support embedded Linux right now. If your product runs on Zephyr, QNX, VxWorks, FreeRTOS or a vendor OS, tell us. The renderer needs a frame buffer and the backend needs sockets, and ParparVM already emits portable C, so a new OS means porting two layers. Real demand decides which one comes next, and that includes a proper hard real-time RTOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  More This Week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Real-time threads
&lt;/h3&gt;

&lt;p&gt;A vacuum's motor loop, or a POS card reader's timing, has deadlines, and a garbage collector that stops the world is the usual reason people say Java can't meet them. Codename One now has real-time threads on PREEMPT_RT Linux that the collector never stops:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBUW2N5Y2xlIGluIHlvdXIgUmVhbHRpbWVUYXNrXSAtLT4gQntCdWlsZH0KICAgIEIgLS0-fGFsbG9jYXRlc3wgWFtCdWlsZCBmYWlscywgbmFtZXMgdGhlIGxpbmVdCiAgICBCIC0tPnxjbGVhbnwgTltOYXRpdmUgY29kZSwgbm8gSklUXQogICAgTiAtLT4gUltTQ0hFRF9GSUZPIHRocmVhZCwgcGlubmVkIGNvcmUsIGxvY2tlZCBtZW1vcnldCiAgICBHW0dhcmJhZ2UgY29sbGVjdG9yXSAtLi0-fG5ldmVyIHN0b3BzIGl0fCBS%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBUW2N5Y2xlIGluIHlvdXIgUmVhbHRpbWVUYXNrXSAtLT4gQntCdWlsZH0KICAgIEIgLS0-fGFsbG9jYXRlc3wgWFtCdWlsZCBmYWlscywgbmFtZXMgdGhlIGxpbmVdCiAgICBCIC0tPnxjbGVhbnwgTltOYXRpdmUgY29kZSwgbm8gSklUXQogICAgTiAtLT4gUltTQ0hFRF9GSUZPIHRocmVhZCwgcGlubmVkIGNvcmUsIGxvY2tlZCBtZW1vcnldCiAgICBHW0dhcmJhZ2UgY29sbGVjdG9yXSAtLi0-fG5ldmVyIHN0b3BzIGl0fCBS%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="958" height="289"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MotorLoop&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;RealtimeTask&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;gains&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// allocate up front&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;PwmChannel&lt;/span&gt; &lt;span class="n"&gt;pwm&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;                            &lt;span class="c1"&gt;// may allocate&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;pwm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Hardware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openPwm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HardwareException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;e&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;cycle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;                            &lt;span class="c1"&gt;// must not allocate&lt;/span&gt;
        &lt;span class="c1"&gt;// read sensors, compute gains, then pwm.setDutyCycle(...)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;Realtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"motor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RealtimeParameters&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setPeriodNanos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setPriority&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setCpu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;MotorLoop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;cycle()&lt;/code&gt; allocates, the build fails and names the method and the line. Every thread keeps latency statistics so you can prove the deadline on your own board. Monday's &lt;a href="https://www.codenameone.com/blog/real-time-java-control-loops/" rel="noopener noreferrer"&gt;real-time article&lt;/a&gt; explains the terms, what makes this hard for a managed language and how we handle each part.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dash: race through your city
&lt;/h3&gt;

Dash gameplay on a neon track.

&lt;p&gt;Dash is our second game template: an endless runner whose levels can start as a 2D side-scroller and swing into 3D mid-run. Pick two points on a real street map and the route becomes a level, street names and landmarks included:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;CityRoute&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CityRoute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Old Harbour"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;420&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CityRoute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;STRAIGHT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Quay Street"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;310&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CityRoute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;LEFT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Rope Walk"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nc"&gt;LevelDef&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server replays every run to keep the leaderboards clean, and friends race the same track with voice chat. Saturday's &lt;a href="https://www.codenameone.com/blog/build-an-endless-runner-in-java/" rel="noopener noreferrer"&gt;Dash article&lt;/a&gt; has the details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pulse: heart rates from the wrist to the trainer
&lt;/h3&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/pulse-phone-trainer.mp4" rel="noopener noreferrer"&gt;Download the trainer video&lt;/a&gt;.

&lt;p&gt;Pulse is a gym and studio template built around health data. A member's watch or Bluetooth chest strap feeds a workout session, the readings go to the studio's backend, and the trainer sees every member's heart rate zone live. Past workouts come in from HealthKit or Health Connect through one API. Sunday's &lt;a href="https://www.codenameone.com/blog/launch-your-own-gym-app/" rel="noopener noreferrer"&gt;Pulse article&lt;/a&gt; walks through the health code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Xbox, and help with consoles
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;codename1.arg.windows.xbox=true&lt;/code&gt; builds the native Windows port as a UWP app for Xbox Developer Mode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBHW1lvdXIgZ2FtZSBvciBhcHBdIC0tPiBQW05hdGl2ZSBXaW5kb3dzIHBvcnRdCiAgICBQIC0tPnx3aW5kb3dzLnhib3g9dHJ1ZXwgVVtVV1AgYXBwIGNvbnRhaW5lcjxici8-Q29yZVdpbmRvdywgbm8gZGVza3RvcCB3aW5kb3ddCiAgICBVIC0tPiBSW0RpcmVjdDJEIGludG8gYSBEaXJlY3QzRCBzd2FwIGNoYWluXQogICAgVSAtLT4gSVtDb250cm9sbGVyOiBELXBhZCBhbmQgc3RpY2sgdG8gZGlyZWN0aW9uczxici8-QSB0byBmaXJlLCBCIHRvIGJhY2tdCiAgICBVIC0tPiBTW1RWIG92ZXJzY2FuIGFzIHRoZSBkaXNwbGF5IHNhZmUgYXJlYV0%3D%3Ftype%3Dpng%26bgColor%3Dffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FZmxvd2NoYXJ0IExSCiAgICBHW1lvdXIgZ2FtZSBvciBhcHBdIC0tPiBQW05hdGl2ZSBXaW5kb3dzIHBvcnRdCiAgICBQIC0tPnx3aW5kb3dzLnhib3g9dHJ1ZXwgVVtVV1AgYXBwIGNvbnRhaW5lcjxici8-Q29yZVdpbmRvdywgbm8gZGVza3RvcCB3aW5kb3ddCiAgICBVIC0tPiBSW0RpcmVjdDJEIGludG8gYSBEaXJlY3QzRCBzd2FwIGNoYWluXQogICAgVSAtLT4gSVtDb250cm9sbGVyOiBELXBhZCBhbmQgc3RpY2sgdG8gZGlyZWN0aW9uczxici8-QSB0byBmaXJlLCBCIHRvIGJhY2tdCiAgICBVIC0tPiBTW1RWIG92ZXJzY2FuIGFzIHRoZSBkaXNwbGF5IHNhZmUgYXJlYV0%3D%3Ftype%3Dpng%26bgColor%3Dffffff" alt="Diagram" width="921" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your game keeps reading &lt;code&gt;Display.getGameAction()&lt;/code&gt; as it does on a phone. We haven't run it on a real Xbox yet, and Developer Mode can't sell a game. Shipping on consoles needs SDKs behind NDAs, so Tuesday's &lt;a href="https://www.codenameone.com/blog/codename-one-on-xbox/" rel="noopener noreferrer"&gt;Xbox article&lt;/a&gt; is also a request: if you can open that door, talk to us.&lt;/p&gt;

&lt;h3&gt;
  
  
  Port your Spring code with fewer edits
&lt;/h3&gt;

&lt;p&gt;Porting real services to the Codename One backend keeps finding the small things a Spring developer expects. This round closed a batch of them, so code like this now moves over unchanged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@CrossOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;origins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://shop.example.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;Logger&lt;/span&gt; &lt;span class="no"&gt;LOG&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLogger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;OrderController&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@PostMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"/orders"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;consumes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;produces&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="nf"&gt;place&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ResponseStatusException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"An order needs at least one line"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="no"&gt;MDC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"customer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="no"&gt;LOG&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Placing order with {} lines"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Json.read(body, Order.class)&lt;/code&gt; and &lt;code&gt;Json.write(order)&lt;/code&gt; work through codecs generated at build time, &lt;code&gt;String.matches&lt;/code&gt; and &lt;code&gt;java.util.regex&lt;/code&gt; work, and &lt;code&gt;BigDecimal&lt;/code&gt;, &lt;code&gt;YearMonth&lt;/code&gt;, &lt;code&gt;Semaphore&lt;/code&gt; and &lt;code&gt;ConcurrentLinkedQueue&lt;/code&gt; are there. A cn1lib can now also ship its own controllers, entities, and migrations. Wednesday's &lt;a href="https://www.codenameone.com/blog/cn1libs-with-a-server-side/" rel="noopener noreferrer"&gt;backend article&lt;/a&gt; has the full list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dart debugging, a faster web port and JFX Central
&lt;/h3&gt;

&lt;a href="https://www.codenameone.com/blog/release-2026-11-06/JFXCentral-demo.mp4" rel="noopener noreferrer"&gt;Download the JFX Central video&lt;/a&gt;.

&lt;p&gt;That's &lt;a href="https://www.jfx-central.com/" rel="noopener noreferrer"&gt;JFX Central&lt;/a&gt;, a real JavaFX application written by JavaFX experts, running on an iPhone through our JavaFX layer. It isn't as polished as an app written for Codename One, but bindings, cells, CSS and remote images all work.&lt;/p&gt;

&lt;p&gt;Flutter apps now debug in Dart: the build rewrites the class files' line tables and adds a JSR-45 source map, so stack traces name your &lt;code&gt;.dart&lt;/code&gt; files and the standard Java debugger steps through Dart. The JavaScript port got faster too. It inlines getters and setters, fuses &lt;code&gt;StringBuilder&lt;/code&gt; chains into plain string operations and keeps every array packed. String building in our compute suite went from 99 to 68 ms, and every checksum still matches the JVM. Integer division by zero now throws &lt;code&gt;ArithmeticException&lt;/code&gt; in the browser, as Java says it should. Thursday's &lt;a href="https://www.codenameone.com/blog/debug-dart-in-a-java-debugger/" rel="noopener noreferrer"&gt;article&lt;/a&gt; covers all three.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.codenameone.com/developer-guide/embedded-linux/" rel="noopener noreferrer"&gt;embedded Linux chapter&lt;/a&gt; covers displays, the GPU path, board profiles, deployment, hardware access, the five connected-product shapes and the full benchmark with its method. The harness is in &lt;code&gt;scripts/embedded/bench&lt;/code&gt; in the &lt;a href="https://github.com/codenameone/CodenameOne" rel="noopener noreferrer"&gt;repository&lt;/a&gt; if you want to rerun it on your own board. I'd love to see those numbers.&lt;/p&gt;

&lt;p&gt;If you're building a device, tell me what board it runs on and what you're using today. And if your product needs an OS we don't support yet, that's exactly the conversation I want to have.&lt;/p&gt;

</description>
      <category>java</category>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
  </channel>
</rss>
