Post on 12-Apr-2017
What is Codename One?
History
2006 2008 2010 2012 2014 2016The Beginning
Chen Fishein starts the LWUIT project at Sun Microsystems with goals of ending device
fragmentation
Open Source
Sun Microsystems Open sources LWUIT at Java One
A new Beginning
Chen & Shai quit Sun Microsystems and form
Codename One. The project has far greater scope and
ambition than LWUIT
100M Installs
Codename One grows & expands both in scope and
use
MaturityBy January 2017
Codename One had 10 releases, added support for JavaScript, UWP & Desktop platforms. The bourgeoning developer community was
40k strong
What’s Codename One?
✦Virtual machine for all devices ✦API for all devices ✦ IDE Plugins to build mobile
applications ✦Set of tools, simulator, GUI builder,
theme designer ✦Cloud based build system to abstract
device differences
What’s Codename One?
✦Virtual machine for all devices ✦API for all devices ✦ IDE Plugins to build mobile
applications ✦Set of tools, simulator, GUI builder,
theme designer ✦Cloud based build system to abstract
device differences}
What’s Codename One?
✦Virtual machine for all devices ✦API for all devices ✦ IDE Plugins to build mobile
applications ✦Set of tools, simulator, GUI builder,
theme designer ✦Cloud based build system to abstract
device differences}
Fun FactWe came up with the name
Codename One as a placeholder until we find an actual name
Eventually we kept it because it makes these distinct tools act as
“one”
Virtual machine for all devices
✦ iOS doesn’t support Java & disallows JIT. Codename One’s open source ParparVM translates Java bytecode to C code so it can be compiled with xcode
✦Windows mobile works with a .net VM subset, Codename One ported iKVM (a Java .net runtime) so it will work with Universal Windows Platform
✦For web support Codename One uses TeaVM which translates Java bytecode to JavaScript
API for all devices
✦Common API abstracting mobile device functionality mainly UI
✦Clearly defined porting layer implemented for all supported platforms
✦Lightweight UI approach ✦Focus on simplicity, portability & common use
cases ✦Statically linked
IDE Plugins
✦Codename One includes plugins for IntelliJ/IDEA, NetBeans & Eclipse
✦These plugins hide the complex details of installing/setting up Codename One
✦They are mostly a thin layer around the tools
Tools
✦Build tools - based on Ant, invoked by IDE for cloud builds and other capabilities
✦Device Simulator ✦Resource Editor/Designer - provides theming,
localization, image management and old GUI builder
✦New GUI Builder - standalone GUI builder tool replacing the old one within the designer
Cloud Build
✦Macs, Windows & Linux machines in the cloud perform the actual native app build process
✦This is abstracted by the build tools to provide a unified experience
✦Removes the need to install custom software and configure it to very specific requirements
✦A major reason Codename One is so simple to use
Lightweight
Lightweight Frameworks Heavyweight Frameworks
Codename One SWT
Swing AWT
Java FX Xamarin
QT Appcelerator
Lightweight vs. Heavyweight
Lightweight Frameworks Heavyweight Frameworks
Codename One SWT
Swing AWT
Java FX Xamarin
QT Appcelerator
Lightweight vs. HeavyweightLightweight Origin
The term “lightweight” was popularized by the Swing framework to describe the difference between it
and AWT. Heavyweight widgets in AWT were a performance problem
as they required OS communication for every operation
Lightweight Frameworks Heavyweight Frameworks
Draws widgets Native widget for every user widget
Handles widget events & user input Thin API
Layout, theming & all functionality is handled by framework Layout etc. are handled by OS
Framework provides tools Mix of framework tools and OS tools
Lightweight vs. Heavyweight
Lightweight Frameworks Heavyweight Frameworks
Portable Matches OS Conventions
Customizable Performant (debatable)
Consistent (also in performance) Easier to build initially
Easy to use Access to native OS features
Lightweight vs. Heavyweight
Lightweight In Codename One
✦Allows native peer - e.g. Google Maps, Video etc. ✦Lightweight components can reside on top or
below native peers ✦Enables the simulator and thus the cloud build! ✦Performant - uses gaming API’s (e.g. OpenGL) to
get native performance. Performance is consistent across devices
✦Very customizable
I hope that this presentation:
✦Gave you a sense of Codename One’s origins ✦Gave you a glimpse of the breadth/scope of
Codename One ✦Helped you understand the difference between
Codename One and other tools you are familiar with
✦Clarified one of the most important aspects of Codename One: Lightweight architecture
Thank You