Compare Codename One
To properly evaluate a platform we often look at our existing experiences and evaluate based on what we know. The set of options below present some of insights about how we match up to other cross platform solutions in the market today. But first lets start up with the Codename One benefits:
Java basedLove it or hate it Java is still king of the hill. With 9-10 million active Java developers and a permanent spot as one of the top programming languages. The language/platform are familar to tens of millions of developers world wide guaranteeing code maintainability well into the future.
Codename One translates all the code to native code or the native VM resulting in performance that matches or exceeds the performance of native code.
Developers can use the rich tools available for Java developers such as Eclipse/NetBeans to work with the code. Codename One has its own GUI builder and many niceties to track issues in your code. The biggest benefit though is in the build server which generates a native application for you without having to deal with all of the complexities of building a native app for every platform.
Due to its unique lightweight architecture Codename One boast greater portability than HTML5 and more supported devices!
Codename One includes builtin full support for HTML5/webkit when installed on compatible devices,
however we feel HTML5 can't compete with Codename One on several counts:
- Performance - HTML5 is slow to begin with but made slower on devices due to some architectural choices on iOS devices. Codename One performs as fast and even faster than native.
- Portability - while HTML5 on the server side can be ported with some effort, when embedded using PhoneGap like packaging adapting the UI for multiple DPI's becomes challenging. Web technologies were designed for HTTP delivery not for local execution. Codename One was built from scratch to work on all DPI's and provides the visual tools to do so.
- Power - mobile browsers are fragmented and constantly late with new features requiring a full OS upgrade for new features. Basics such as threads aren't at the moment of this writing supported by any device. Codename One provides most of the power and convenience desktop Java developers are used to.
- Ease - HTML isn't hard but JavaScript with CSS and adapting for all devices… Its not as easy as it used to be. Codename One provides visual tools including a build server aleviating the need to install native tools on your machine.
- Stable target - since your code executes on the device browser you are very likely to have device only issues that can't be debugged properly. Codename One is statically linked to your application which means you will have a stable application with an identical version of Codename One on all devices! Since the code is handled by a single entity if you run into problems we can actually help you fix them!
This section is true not just for Appcelerator but to most other tools of its kind such as MonoTouch, RhoMobile and others. We think the biggest difference between Codename One and all of these guys is that we have a Java based solution.
- Native tools - in order to build an application for iOS you must have a Mac and for Windows phone (if supported) you need a windows machine. This is tedious and painful! Codename One uses a build server to remove that need and provides seamless simulator execution, debugging, profiling etc.
- Standard IDE - most such tools have their own IDE's with limited features. Codename One works with NetBeans/Eclipse, which are mature industry leading IDE's.
- Portability - in order to provide portability a developer is limited to the lowest common denominator approach, this requires coding specifics for every platform. Codename One uses a unique lightweight architecture that enables it to offer high level features on all devices.
- Ease - most such tools don't offer features such as integrated GUI builders, themes, localization etc…
Google recently announced the J2ObjC compiler open source project, it isn't really comparable to Codename One and solves a completely different problem. However we get asked about this frequently so this is a direct quote from their site:
Other than that, the tool just deals with the iOS porting of business logic. Requires a Mac and requires that developers work with xcode. It doesn't include a full featured garbage collector (the OS X GC mentioned in their wiki was deprecated on OS X and ARC is not a GC) and isn't really a cross platform solution.J2ObjC does not provide any sort of platform-independent UI toolkit, nor are there any plans to do so in the future. iOS UI code needs to be written in Objective-C or Objective-C++ using Apple's iOS SDK (Android UIs using Android's API, web app UIs using GWT, etc.).
Large parts of Codename One were inspired by the design of Swing however a great deal was fixed,
Codename One fixed many concepts in Swing thanks to hindsight and experience in Swing development
e.g.:
It is remarkably hard to port a scene-graph implementation consistently to every platform and then integrate it with the native platfrom widgets as we are sure the guys at Oracle have found out. Making this sort of implentation performant is even harder as the guys from Adobe found out.
- Optimized for phones/tablets, this includes support for gestures and complex key layouts
- Proper styles & themeing
- Resource file format/standard GUI builder
- Truly open source
- Static linking
It is remarkably hard to port a scene-graph implementation consistently to every platform and then integrate it with the native platfrom widgets as we are sure the guys at Oracle have found out. Making this sort of implentation performant is even harder as the guys from Adobe found out.
ADF mobile is a 20K USD tool that provides the ability to
create some iPhone applications using a combination of J2EE
and HTML5 essentially bringing the worst of all worlds
together.
It works only on iOS with this architecture, where other platforms use a somewhat different architecture. It suffers from all the problems of PhoneGap/HTML (mentioned in the first section) and it adds to that all the complexity of working with a Java backend without removing those other complexities.
To make matters worse, since the VM is embedded into the code you are limited to an interpreted mode which means slow performance on top of the existing HTML5 overhead!
It works only on iOS with this architecture, where other platforms use a somewhat different architecture. It suffers from all the problems of PhoneGap/HTML (mentioned in the first section) and it adds to that all the complexity of working with a Java backend without removing those other complexities.
To make matters worse, since the VM is embedded into the code you are limited to an interpreted mode which means slow performance on top of the existing HTML5 overhead!
3rd Party Comparisons
Here are some comparisons of Codename One to other technologies produced by 3rd parties:
- Steve Hannah - "I have been developing with Codename One for a couple of months now. Based on that, you would probably guess that it was my choice for developing native mobile apps. You would be correct. When you line up all of the other options for development (native SDKs, Appcelerator, ADF, etc..), Codename One wins on almost every front." [read more...]
- Eric Coolman - "Codename One, a Mobile Development Toolchain on Steroids - There’s a new suite of open source tools currently just entering public beta as of this writing, that is going to offer a dramatic increase in productivity in mobile development like never seen before" [read more...]
- Jay Ginete - "So which one to use? Truth be told, that depends on what you are comfortable with. If you're an old hand with Java and you want to make mobile applications then (I suggest that you) go with Codename One but if started out as a web developer then you might want to go with PhoneGap." [read more...]
- Trinisoft inc - "Codename One: Another Java Promise Delivered - Development is also easy, all you need is Netbeans. It comes with a GUI builder and a Simulator. One thing you will notice again is that the Simulator is fast. Very fast! Have you tried to develop for Android and Blackberry? Then you will notice that the Codename One Simulator is order of magnitude fast." [read more...]