Latest posts from Codename One.
Blog

One Java Model from the App to PostgreSQL
The annoying part of full stack development is finding the same rule in three places. The app checks a field, the server checks it slightly differently, and the database model has another idea about what it should contain. Yesterday’s post explained why we brought Codename One’s runtime to the backend. Today we’ll build a reminder service and follow one model from Java code into the database. The backend is experimental, but the pieces here already include generated routing, pooled connections, an ORM, and transactions. ...

We Didn't Want to Build Another Java Server
Why Build Another Java Server? The last thing we wanted to build was another Java server framework. We have Spring, Micronaut, Quarkus, and enough ways to answer an HTTP request to fill a conference schedule. Yet we know Java developers who pick Node.js or Go for their newer projects. Why? The answers varied, but two kept coming up: size and performance, especially for microservices and serverless deployments; and full stack development. A process that starts for one request has a different budget from a server that stays up for a month. For full stack development, Codename One lets the app and server share entity classes and validation rules. One REST contract generates the app client and server dispatcher, while the same ORM annotations generate data access objects (DAOs) for local SQLite and the server database. ...

Android 17 Without the Last-Minute Scramble
One of the bugs in our Android 17 preparation was a version number. The platform was 37.2. One builder path removed the punctuation and read it as 372. That number sailed through minimum-version checks. A different path tried to parse the suffix as an integer and failed outright. Neither had anything to do with the application a customer was trying to build. This is the work we want to do before a target-SDK deadline arrives. The API 37 changes check the new platform and fix its path through the builder. The location button then exercises a new permission flow in a generated application. Along the way, PEM parsing and task removal take two more recurring pieces of security code out of individual apps. ...

Javadoc That Feels Like Your Website
Follow a link from the developer guide into an API method and you used to arrive in what felt like another website. The navigation changed. The styling changed. Dark mode made the join harder to hide. We had wrapped standard Javadoc output, scoped its CSS, and loaded its pages through JavaScript. Every improvement to the surrounding site left us with another detail to reconcile inside that wrapper. ...

Native Drag and Drop Meets Cross-Device Continuity
You are halfway through a draft on your phone when you sit down at your computer. The words are already written. The document is already open. Starting again should not be the price of changing screens. Finishing the draft raises another familiar task: getting its output into another application. Copy and paste can help, but dragging the document onto its destination is often the action you reach for first. ...

Faster Starts, Less JavaScript Overhead
A margin calculation is an odd place to find a startup stall. It sounds like arithmetic. In our native Mac profile, it could wait for the operating system’s main thread. Following that call led to screen-scale queries repeated across components, a theme scan repeated across styles, and a switch generating blurred artwork just to say how big it was. None of those costs required a complicated screen. They happened while constructing an ordinary one. ...

Faster Maps: Chasing Swiss Speed
After looking at Go’s collector, we turned to its maps. Swiss tables have an appealing premise: keep entries compact, use a small amount of metadata to narrow the search, and avoid chasing a separate object for every mapping. ParparVM already had compact arrays and separate metadata. We were starting closer than I expected. Then a missing key spoiled the picture. Three million containsKey calls took 32.7 seconds, while the benchmark we usually watched still looked healthy. It mostly asked for keys that existed. ...

What Go Taught Us About Java Garbage Collection
As Java developers, we take a lot of inspiration from HotSpot. It is the gold standard for many of us, and for good reason. But measuring ParparVM against Go recently sent me down a different path. My first thought was stack allocation. If Go was keeping more objects off the heap, that would explain a lot: fewer allocations, fewer pointers to follow, less work for the collector. It is the same attraction that makes Valhalla’s value objects so interesting to Java developers. Why pay for a separate object when what you need is a value? ...

Lies, Damn Lies and Benchmarks
There’s an old joke about three kinds of lies: lies, damn lies, and benchmarks. Codename One did very well in our benchmarks. But were they accurate? Were they representative? Performance is the fitted sheet of programming. Just when you get the damn corner into place, the rest of the bed is a complete mess. This week we made a concentrated effort to get a few more corners into place, and got a lot done. There’s still work ahead that we’ll discuss next week, but it’s getting to a point where I feel confident saying Codename One is pretty fast. Not the best (yet), but fast. ...

Pick One Contact Without Asking for the Address Book
A share screen needs one phone number. A delivery form needs one address. Neither feature needs a database of everybody the user knows. PR #5680 adds ContactPicker, a permission-free path that returns only the contacts and fields the user selects. It uses the Android 17 system Contact Picker, a narrow fallback on older Android versions, and Apple’s CNContactPickerViewController on iOS. For VoIP, VPN, native Mac and Windows work, OTP, billing, and the platform-watch process that found this gap, read the weekly overview. ...

We Stopped Waiting for Platform Changes to Find Us
For years, our warning system for Apple and Google changes was a developer whose build failed first. The community gave us excellent reports, but the sequence was backwards. A platform owner announced a deadline, time passed, an application hit the change, and only then did we trace it into the builder. This week we started a daily scheduled Codex task that reads official notices and checks them against Codename One. Its first useful results include Android 16 back handling in PR #5673 and the permission-safe Contact Picker in PR #5680. ...

Fill an SMS Verification Code Without Reading the Inbox
A six-digit text field should not need access to every message on a phone. PR #5642 adds one-time-code autofill, a country-aware phone-number field, and a complete verification component. iOS, Android, and the browser can offer the code through their protected autofill path. The application never receives the rest of the inbox. For the rest of this release, including native call management, VPN, AppKit, windows, and contacts, read the weekly overview. ...