Latest posts from Codename One.
Blog

Questions of the Week 39
We are ending the enterprise annual promotion today so if you didn’t sign up for this special deal this is literally your last chance. This is important as the JavaScript build promotion will expire soon so I suggest taking advantage of this! We had a lot of updates and new features this week but we decided in advance to skip the update right after the release and so we’ll push them out only next week. ...

HTML Maps, Z-Order Peer & Properties Update
One of the problems with native maps is that they work very differently between the device and the simulator. This is because we use MapComponent on the simulator and as a fallback on the devices where Google Maps isn’t available. We just committed a new mode for maps that allows you to use the Google HTML maps as the fallback instead of the MapComponent. This is faster, has better support from Google and is more similar to the way maps work on the physical device because the browser component is also a peer component so similar restrictions will apply. This is off by default since the HTML maps require a key and right now we didn’t finish mapping all the components. This also needs some server functionality so I’m not sure when this will land in the actual extension but it’s already there is you build from source. We’ll post more about this when we do an official refresh of the extension. ...

Automatic Build Hints Configuration
We try to make Codename One “seamless”, this expresses itself in many small details such as the automatic detection of permissions on Android etc. The build servers go a long way in setting up the environment as intuitive. But it’s not enough, build hints are often confusing and obscure. It’s just hard to abstract the mess that is native mobile OS’s and the odd policies from Apple/Google… E.g. a common problem developers face is location code that doesn’t work in iOS. This is due to the ios.locationUsageDescription build hint that’s required. The reason we added that build hint was a requirement by Apple to provide a description for every app that uses the location service. ...

Migrating from Parse to Back4app
A couple of years ago I wrote an app for my spouses yoga studio for managing her student list. I intended to open source it but the code is a bit messy and I can’t seem to find the time/energy to clean it up. I used the excellent parse4cn1 library from Chidiebere Okwudire during the height of Parse. As Parse ended I started thinking about contingency plans but after a few emails with Chidi and his posts detailing the various options I thought it might be possible to take the “lazy approach”. ...

Codename One 3.6 Now Live & Special Sale
Codename One, the “industry defining” Write Once Run Anywhere native mobile app platform for Java developers has just published version 3.6. We’re thrilled with this release whose key features are offline build support and official support for UWP (Universal Windows Platform). Starting with this release we are changing the scope for Codename One: Instead of trying to be “as good as native” we’d like to aim to be “better than native”. ...

Questions of the Week 38
Codename One 3.6 is finally landing early next week, this means that today there is no Friday release and we might skip it next week too so we can rest from this long release process. Once that is out of the way we can finally set our sights on 3.7. We already have a long wishlist for that release and I hope we’ll be able to deliver on that. ...

Migrating from Digital Ocean to Linode
We haven’t talked as much in recent years about what it takes to run Codename One. Our infrastructure and backend are pretty complex with multiple pieces working in cohort to make everything feel like a single product. As part of that we work with 5-10 different backend SaaS providers that sell us various services, this might seem like an “odd” statement since the number should be fixed but it isn’t… ...

Certificate Verification, Avoid SSL Pinning Vulnerability
Certificate pinning is a security measure designed to thwart potentially dangerous and complex attacks. Since those sort of attacks are pretty hard to execute it’s a security measure that is probably unnecessary for most developers. However, if you are building an application for a very sensitive industry (e.g. Government, Banking etc.) you might be required to include this defensive measure. When we connect to an HTTPS server our client checks the certificate on the server. If the certificate was issued by a trusted certificate authority then the connection goes thru otherwise it fails. Let’s imagine a case where I’m sitting in a coffee shop connected to the local wifi, I try to connect to gmail to check my email. Since I use HTTPS to Google I trust my connection is secure. ...

First Class Eclipse Support
Our eclipse IDE support has been around for quite a while now but has never stood up to the quality and update pace of NetBeans. Recently even our IntelliJ/IDEA support has surpassed the quality of our eclipse plugin and the blame should be on us. One of the problems is that our team doesn’t use eclipse and uses a diverse set of OS’s (Macs/Windows) which is problematic when sharing workspaces. Integrating the eclipse plugin build into our standard release process proved really hard and it ended up eventually as something we need to do but never got around to do it… ...

TIP: Nest cn1libs Cross Dependencies
On occasion developers ask us for cn1lib dependencies, e.g. allowing one cn1lib to use functionality in another cn1lib. This isn’t something we rolled into the cn1lib infrastructure because we strongly believe in simplicity. Dependency management solutions become fragile once nesting sets in and often mask over-engineering which is really dangerous for a tool that depends on small footprint. A cn1lib is really just an ant project that packages the results into a zip containing nested zips with the data relevant to all the platforms. To add another cn1lib lib to the classpath first you need to unzip that cn1lib. ...

Questions of the Week 37
We thought about skipping the release today and going strait for a release on the day of the code freeze but this might create a situation where a regression is missed because you didn’t have enough time with the code. This means we might have more than one update until the 16th release of 3.6 so please bare with us. We will release plugin updates with the code freeze and they should include the release candidate of 3.6 within them. ...

Site Search
Just a couple of weeks ago I was offering tips on how to search the website in lieu of a search engine. Having gone thru the process repeatedly and trying many different approaches and off the shelf solutions we decided to build something simple of our own and we did. This is a compromise, search works on the server instead of using the fact that the site is statically generated. As a result it is far from ideal but it’s still pretty comprehensive and finds the right answers for most of the stuff we threw at it. ...