Latest posts from Codename One.
Blog
Search the blog
Bastion: A Hardened Bank Template, and Crypto Wallets in Core
A large share of the teams building on Codename One are banks and financial institutions. They don’t ask me for a prettier list component. They ask how to pass a penetration test, what the auditor will want to see, and which protections actually work on which device. Bastion is my answer, written as code. It’s a virtual bank and a small exchange, the app and its server in one Java project. Customers hold dollars, euros, bitcoin and ether, move money, issue and freeze cards, trade, and withdraw coins to addresses they’ve allowed in advance. Staff verify the ledger and the audit trail. It’s a template you can brand, but mostly it’s a reference: every hardening technique in it is there so you can read how it’s done. ...

Your Swing and JavaFX Code on iPhone, Android and the Web
There’s a lot of Swing and JavaFX code in the world. Much of it is internal tooling and line of business software that works fine and that nobody wants to rewrite. Then someone asks for it on an iPad, or in a browser, and the answer has always been “rewrite it.” Codename One can now build a large share of that code for iOS, Android, the web and native desktop, as a native app with no JVM inside. SwingSet2 and Notepad, the JDK’s own demos, both build and run. This post shows what carries over, what it costs in size and start-up (less than the JVM), and why the parts that don’t carry over have better replacements in a client app. ...

Your Compose Code, on More Screens and Less CPU
If Codename One didn’t exist, Kotlin Multiplatform is probably the platform I’d choose. I prefer Java, but Kotlin is a good language, and KMP was one of the strongest platforms we measured against in the Flutter post this week. Its first take on UI leaned on heavyweight native widgets, the way React Native does. The team learned from that, and Compose Multiplatform today is a good product built by people who care about performance. ...

Flutter Better in Java
I usually blog about a feature the week it lands. This one landed a few weeks ago and was in development for months before that: Codename One can now take a Flutter app’s Dart source and build it as a Codename One app. The results are amazing. I held this post back because I know how explosive these claims are. I wanted the numbers to come from a CI job that runs on every commit instead of a benchmark I tuned once on my laptop. ...

WebRTC Calls, Key Agreement and ORM Checks at Build Time
The last post this week covers what Parley, Savor and Wayline needed underneath: calls, encryption and a backend you can trust with real data. These are features you’d usually assemble from three vendors and a few weekends of glue code. Voice and video calls with WebRTC com.codename1.webrtc carries live audio and video directly between two devices, encrypted on the way, with a TURN relay when there’s no direct path. On Android it’s Google’s WebRTC library, on iOS the Apple build of the same library, and in the browser it’s the browser’s own WebRTC. Referencing the package is what adds the native library to a build, so apps that don’t make calls don’t pay for it. ...

Native Menus, File Dialogs and 3D Models
A desktop app gets judged in the first ten seconds. If the menu bar is wrong, Cmd+Q does nothing or the Save dialog looks like it came from a different decade, people notice, even if they can’t say what bothers them. The word processor from last Friday’s post needed all of that to hold up next to a native app, so those pieces are now part of Codename One. They work with the code you already write for a phone. ...

More of the Java API, and an Experiment With Unity Games
This post is about code you already have: Java code you want to reuse, and, as an experiment, Unity games. Much more of the Java class library Codename One always shipped a subset of the Java API. That kept apps small, but it also meant that a library from Maven Central or a utility class from your server often needed edits before it compiled. That gap is now much smaller. 116 classes and interfaces joined the class library: ...

Savor: A Food Delivery Template for Restaurants and Local Fleets
Delivery platforms take a big cut of every order, often between 15% and 30%. For a restaurant running on thin margins, that cut can be the whole profit. That’s why so many restaurants, small chains and local delivery startups want their own ordering app, and why most of them give up when they see what it takes: a customer app, a kitchen screen, a courier app, an operations console, payments, maps and a server that ties it together. ...

Parley: A Private Messenger Template You Can Brand
Plenty of organizations want their own messenger and can’t use WhatsApp for it. A hospital that needs staff chat it controls. A company that wants messaging inside its product, under its brand, with no third party reading along. A community that doesn’t want to live on someone else’s platform. Building a secure messenger from scratch is a long project: the encryption protocol, multi-device sync, push, calls, media, groups and moderation are each a project of their own. ...

Skirmish: A Multiplayer Strategy Game Template in Java
For years I avoided pitching Codename One as a game engine. Unity, Unreal and Godot own that market, and I didn’t see a reason for a game developer to pick us. That changed while we were building our app templates. A modern mobile game is mostly app: sign-in, menus, a shop, friends lists, quests, push notifications, analytics and a server. The battle itself is a small part of the code. Those other parts are exactly what Codename One is good at. ...

Rewrite Everything in Java: Not Rust
Rust is a great language for a kernel, a driver or a database engine. Code like that can’t pause for a garbage collector and has to account for every byte, and Rust’s ownership model pays for itself there. Somewhere along the way “rewrite it in Rust” turned into the default answer for everything, including desktop and mobile applications. For applications, I think that’s the wrong trade. You pay more to write the code, more to review it and more to build it, and you don’t get a better application in return. ...

A Java IDE in Your Browser, With Your Files in Your Browser
If you’re used to opening a page and immediately changing an app, installing a Java development environment is a substantial detour. I want your first encounter with Codename One to be the app running. Our new browser IDE is a highly experimental, very early preview. Open it, press Run and start changing the Java. It has a project tree, multiple files and an application preview. Think of the Playground growing into a proper IDE workspace. ...