Latest posts from Codename One.
Blog

On Device Web Server
I try to write about every new feature or capability we introduce but this isn’t always possible. Tasks sometimes weigh me down and as they do so I sometimes find something that I totally neglected as it was released. Such is the case with the CN1Webserver library which we launched over 6 months ago. It got lost and in fact it came out during such a busy period I completely forgot about it. ...

Code Ranch Questions
I’m answering questions in the Code Ranch this week about Create an Uber Clone in 7 Days. So far I’ve had some pretty great ones, if you have a question join the conversation for a chance to win a free copy. To qualify just ask in the Android forum and make sure to qualify it with “Create an Uber Clone in 7 Days:” so I will notice the question. ...

Uber Book is Out! (And JDK 11 Support)
Finally after all this time you can buy the Uber book today in both in Kindle and print versions! Notice that the kindle pricing is currently very low due to Amazon’s restrictions. Once the Amazon exclusivity expires the price of the ebook will go up. Notice that the book is also available on all Amazon domains so you can order from UK, DE, FR, ES, IT, NL, JP, BR, CA, MX, AU and IN. ...

Table Property Mapping
If you aren’t using properties with Codename One, you probably should. Here’s a post I wrote a while back covering them, it should give you a lot of reasons for this. We are slowly integrating them into API’s such as Rest and as a result the code is simpler. A huge bonus is the type safety and flexibility that comes with this API. Up until now binding in properties was mostly limited to “simple” classes such as TextField. Complex structures such as Table weren’t supported. This is no longer the case. ...

SendGrid cn1lib
When we announced the migration to the new cloud servers one of the casualties was the cloud email API. This was a well intentioned API for sending an email from an app. Unfortunately we didn’t understand the complexities of modern mail systems well enough when we came up with this API. It turns out that this is pretty problematic. Mail servers get blacklisted and emails fail to deliver. ...

Rest API Error Handling
We added a lot of features and fixed bugs over the past couple of months and I’ve been a bit lax on blogging. I’ll try to fix that as we approach the revised 5.0 release date. One of the big changes we added over the weekend (it will be in the builds on Friday), is a huge rework of the Rest API. If you are unfamiliar with the Rest API check out this older post. The Rest API had a few problems, the most pressing of these was the inconsistent error handling behavior. A failure of the Rest call didn’t always trigger error handling correctly and behaved inconsistently on reading the response of the error. ...

Ending Support for Legacy Cloud
Starting this weekend builds sent using the old plugin or an old project will fail. You will need to update the plugin to 4.3 (or 4.0.3 in NetBeans) or newer. This is an important phase in removing App Engine from our build stack and moving to a new system. If you are experiencing problems with a project do the following: Right Click the project Select Codename One → Codename One Settings or Codename One Preferences ...

TIP: Use the Two Phase Commit Algorithm for Offline Support
I used to do a lot of enterprise consulting in the day and used to lecture a lot on J2EE (as it was known back then). A lot of that knowledge isn’t as applicable even in the server side today, but the algorithms are surprisingly even applicable in mobile. One of the algorithms I would explain a lot when teaching J2EE was the 2PC AKA Two Phase Commit. ...

Increase your Build Quotas
The most common question we get about Codename One is: “Is Codename One Free”. The direct answer is “Yes” but we don’t want to mislead. You can work with the open source code, which is just as free as any other project. But it’s not for the faint of heart… The build servers have quotas so we won’t go out of business. This is perceived by developers as “not free” but since no one else offers build servers I have an issue with that perception. To battle that perception we’re increasing the build quotas. ...

Uber Book Release Date
I’ve been working on the new “Create an Uber Clone in 7 Days” book for ages. After so much work this is finally almost done! We have a release date: August 16th (yes 2018!). You can already pre-order the kindle edition but you’d get it for free if you buy the print edition which for some inexplicable reason can’t be pre-ordered. UPDATE: Since writing this I’ve added a dedicated book site, I’d rather you share that instead of the link to this post. It’s available here: https://uber.cn1.co/ ...

Rich Push Notifications and Improved Validation
Steve just implemented one of the harder RFE’s we had in a while. It isn’t finished but we can already try some of these features and you should be able to try some of these rich types of push messages. The difficulty stems from the way these push messages are implemented differently in the native OS’s outside of the domain where we have full control. As part of that work our entire developer guide section related to push was rewritten here: https://github.com/codenameone/CodenameOne/wiki/Push-Notifications ...

Migrating from App Engine to Spring Boot
Over the weekend we migrated a huge amount of code to the new build servers. In this post I’ll try to cover three separate things. I’ll explain the architecture/history and process of the migration. What worked, what didn’t work and lessons learned. And finally how this will impact Codename One users moving forward. I’ll start with a bit of history to explain the background and motivations. We formed Codename One in January 2012. Back then Chen and I worked in full startup mode in an accelerator. Chen never worked in a startup before and was amazed by the pace of work, he quipped that we did more work in 3 months than we did in 5 years at Sun Microsystems! ...