Latest posts from Codename One.
Blog
Search the blogSpring Data-Style Repositories Compiled to Native Code
If you use Spring Data, a method such as findFirstByDriverAndStateIn tells you what a repository does before you open its implementation. Codename One now brings that repository model to both the client and backend, with generated Java code that can compile directly into a native executable. The advantage is familiar data access with the runtime setup removed. The build generates concrete repository implementations. Native packaging compiles them ahead of time, so startup doesn’t need to scan for repositories or generate proxies. Direct calls also give the compiler code it can analyze and optimize. ...
Create an Uber Clone in 1 Minute
A lot has changed since 2018, both in programming and in Codename One. Back then I wrote Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java. Today you can start with the application those seven days were meant to teach you to build, then spend your time making it yours. Meet Wayline, a full-stack, white-label ride-hailing application written in Java. Rider and driver apps, an administration console, payments, live tracking and push notifications are already connected to a Java backend. You get the application and its source, ready to adapt to your business. Open the Initializr, choose Wayline, give it your own name and package, and generate the project. That’s the one-minute task. Downloads and a first build depend on your machine; launching a real transport service still takes real work. ...
Smaller Simpler Maven Projects
Opening a new application should show you the application. A directory full of platform modules makes you learn the build’s structure before you have written a screen. Last week we added smaller Gradle projects. Maven now starts small too. The application archetype defaults to the root POM and common, with no platform modules. You can still run the simulator and build the target apps. This closes our weekly release series. ...
PGO for Faster Apps and Generational/Adaptive GC
Your native compiler can optimize an app more effectively when it knows which code actually runs. Profile-guided optimization, or PGO, gives it that information. The build service runs an instrumented version of your application, records its execution and uses the profile to compile the binary your users receive. PGO is now a Pro and Enterprise cloud-build feature for iOS, native macOS and native Linux. You enable it with a build hint; the service handles the extra compilation and training. It is a way to improve native performance without rewriting application logic or managing a profiling pipeline yourself. ...
Try Real Java in Your Browser, Compiler Errors Included
A playground should tell you whether your Java works. A Java-like interpreter can instead teach you which Java it happens to understand. That difference becomes annoying as soon as you paste a record, a lambda or an example with a tricky generic type. We rebuilt the Codename One Playground around our in-tree Java compiler. Your code becomes class files, then the ParparVM translator turns those classes into JavaScript inside the page. The running app loads them and updates the preview. Compilation does not send your source to a server. ...
How Do You Test Spring Compatibility?
The Codename One backend is not Spring compatible. We use similar syntax to ease migration and porting, but familiar annotations do not tell you whether the ported application behaves the same way. Tests do. Write those tests in the original Spring application first. Capture the behavior your clients depend on, get the tests passing, then bring the same assertions to Codename One. Here, compatibility means that your application’s behavior survives the move. It does not mean that Codename One implements the Spring framework. ...
Update DB Schema in Production with Flyway like Syntax
The database on your laptop has today’s schema. The database on a customer’s phone might be six releases old. Both have to work after the next update, and deleting the customer’s data is not a migration strategy. Codename One now uses the same migration engine for client databases and the native backend. It follows Flyway-style versioned scripts and history, with build-time registration so the scripts travel inside the app or server. This continues our weekly release series and supplies the tables behind yesterday’s security stack. ...
Easy Full Stack Authentication and Login in the Style of Spring
Three requests leave your app just as its access token expires. If each refreshes independently, the first exchange can invalidate the refresh token the other two are about to use. A login feature becomes a race between requests. This week’s security work joins the Codename One client and backend around those transitions. The client can coordinate renewal, the server can rotate tokens, and tests can verify what happens after a real request is refused. ...
Android on iOS, Web & Desktop Efficiently and for Free
We are not the first to bring Android to iOS. Earlier projects brought Android’s runtime along with the application. Dalvik was built for Android, including a just-in-time compiler (JIT) that ordinary iOS apps are not permitted to use. Disabling it removes an important source of Dalvik’s performance. Dalvik was designed around interpretation and JIT compilation, not ahead-of-time compilation (AOT), so taking away the JIT leaves an interpreter rather than an optimized native app. ...
Don't Order Fish on Monday. Don't Release on Friday
Anthony Bourdain’s famous warning about Monday fish was a warning about the supply chain behind the menu. In his 1999 essay, he described seafood bought for the weekend still being served on Monday. Knowing how the kitchen worked changed what he would order. Developers have a similar rule: never release on Friday. If something breaks, you have just made plans for everyone’s weekend. It is excellent advice that we have ignored for years. ...
Do You Want Your Web App to Feel Like a Native App?
You can give your Codename One web app the same desktop theme family as your users’ operating system: Aqua on macOS, Fluent on Windows, or Adwaita on Linux. Menus can sit above the app in HTML, with commands such as File and View visible instead of tucked into a mobile overflow menu. That gives you a browser version of your app that fits more comfortably on a desktop. The JavaScript port now supports both choices, and the same theme work reaches the Certificate Wizard you use to sign your apps. ...
Connect Your App to Your Enterprise Traces
Your customer taps “Place order.” The request crosses your app, an API gateway, a native backend, a payment service and a database. Your operations team needs to see that path in the same tracing system it uses for the rest of the company. Neither the client app nor a compiled Java server should disappear from that picture. I wrote a book on debugging, so I am probably more opinionated about this than most people: in 2026, production diagnosis should not depend on somebody searching a pile of logs with grep and guessing which lines belong together. ...