Tuesday, July 31, 2012

Vote for your favorite theme!

We have just licensed some of the wonderful themes from the gorgeous app design vault.

We are working on creating demo applications/templates based on these themes so you guys will be able to leverage them in creating world class user interfaces based around these themes.

In order to accomplish this we need your help...

We need to decide which are the most important themes/apps you would want to see us tackle first.

Currently the main contenders are:
We have some of our own preferences/priorities but I would very much like to hear your opinions or if you think we missed an important theme from there (use the comments for that). If you like them all and don't have a strong opinion don't vote! If you do have a strong opinion about some of the themes then vote for them and we will priorities accordingly.

Use the poll to the right of this blog vote.

Thursday, July 26, 2012

Amazing Week And Growth

We are undergoing serious growth this week and just in time with the introduction of Java 5 language features support and the progress we are making. We just got featured by quite allot of publications, check out our new press page. But probably more important is getting on the front page of hacker news... The comments there were pretty awful (as they usually are) but our traffic went through the roof and allot of it is actionable (people signing up and actually trying).

We know not everything is chocolate and roses about Codename One but we are working hard on making it perfect and need your help. Please complain.
When things don't work or don't look like you would expect let us know, we might dismiss it at first but when we get the complaint from multiple sources we realize that we need to improve.

We already know about quite a few things we need to fix and wrote about them in the past, the beauty of Codename One is its open source nature and the fact that you guys can help us get better.

We highly appreciate the effort that goes into formalizing constructive criticism of our current implementation and the suggestions to fix them. We take all such complaints seriously but with our limited resources some take more time to address than others and for that we apologize. We try to be as transparent as possible both with the code and our decision making process, I feel that even as we grow as a company we will try to personally address the issues and pains bothering you.

Thank you.

PS. We were in a Java development conference for the past couple of days so we didn't have much time to make a release. We will try to make a new release early next week.

Saturday, July 21, 2012

Java 5 Support And Crash Protection Have Landed

We just released an updated NetBeans plugin (Eclipse coming soon) yesterday, it includes one of the bigger changes yet to our architecture: Support for a subset of Java 5.

This effectively means we will enable you to use a large portion of java.util's collections as well as generics, enums, for-each and many other features of Java 5 as part of building an application that will still work on RIM/J2ME devices (and obviously iPhone, Android etc.).

This support is complicated and isn't without its faults/limitations, I ran into some issues with anonymous inner classes that aren't recognized by the bytecode processor. We are working on resolving these but it isn't trivial.

To use Java 5 features you will need to either create a new Codename One project or copy the CLDC jar from a new project to your current project and update the source level in the project properties. You will also need to copy the build XML from a new project to replace your existing build.xml.

Additionally we now have builtin crash-protection support available for paying users (we limit this to paying users due to cloud server costs). You can use the crash-protection code by using something like this:

Log.setReportingLevel(Log.REPORTING_DEBUG);
DefaultCrashReporter.init(true, 2);

This will effectively check every two minutes if there is a change to your log data and if so send it to the server which will email you a link with the log content. Alternatively you can use Log.REPORTING_PRODUCTION to indicate that you only want the log when explicitly sent or with uncaught exceptions. A log can be sent using the Log.sendLog() method.

In order to write information to the log one needs to use the API Log.p(String) or Log.e(Throwable) etc.

Most mobile platforms don't support great Java features like printStackTrace(OutputStream), even those that do (well done Android) don't work well with obfuscated code.

That is why we allow the "crash_protect=true" build argument (again works only for paying users) this will effectively allow a form of poor mans stack traces that work well on all devices even with obfuscated binaries.

We call them "poor mans stack traces" because they don't provide the accuracy and detail of the "real" java stack traces, however they still allow you to trace a stubborn exception that is only reproduced on the device (which unfortunately is something unavoidable for some cases). The stack traces contain only methods that are a part of Codename One e.g. if we invoke a Java API that is not a part of Codename One it will not appear in the stack. Line numbers etc. aren't included in the stack.

Unfortunately this functionality doesn't come cheaply, performance is noticeably impacted by crash_protect at the moment which means we can't use it for production (using logging is just fine though). For now this is mostly practical for debugging, but we intend to improve the performance of this feature as we move forward and make it viable for production systems as well.

Friday, July 13, 2012

Promo Video And Some Updates


We had a very stressful couple of weeks with quite a bit going on in the business side of things. I hope to land in some major server code next week, in the meantime I would appreciate if you guys can let me know what you *honestly* think about this animation (its not narrated).
We might hire a professional animator and ask him to do something along these lines, does it convey the message on a high level? Thanks.

Sunday, July 1, 2012

Major Changes In Codename One

We're launching a few major features into Codename One over the next couple of days that would make a huge difference overall to our product/architecture and your experience: Server arguments & Java language processor.

We will start with the first. Up until now Codename One limited the syntax and functionality of the Java VM to the CLDC level of Java support in order to support RIM and J2ME devices. Starting very soon this will no longer be the case! We have added very extensive Java 5 feature support including generics, enums, annotations etc. newer Codename One applications will start making use of these features as well.

These features are implemented by effectively stripping the syntax sugar from the application, this means you will still need to limit yourself to a small subset of Java 5 features but that subset is growing and will maintain some backwards compatibility. There will be no reflection and some painful omissions such as the lack of the "Number" class are still there, however quite a few things are available.
Keep in mind that NetBeans will still show you a far more extensive set of supported features. We intend to extend the plugin to review the code more closely before sending it to the server for a future release.

The second major change is even bigger, we added the ability to send arguments to the build on the server side and are starting to define the arguments you can send. E.g. when sending an iphone build it was always built as a universal application (both iPhone & iPad support). Starting now, you can add a server argument to indicate that you are interested only in iPhone or iPad versions. The same goes to many similar features.
We now also scan the binary code and fine tune the permissions on the Android platform to match the API's used by the developer. When developing native code on Android you can now insert manifest changes in several locations.

We are really excited about these upcoming changes and how you are too. Here is the current list of arguments, keep up with out developer guide which will include an up to date list of all current arguments:
  • android.min_sdk_version - defaults to "7". Used in the manifest to indicate the android:minSdkVersion property.
  • android.xapplication - defaults to an empty string. Allows developers of native Android code to add text within the application block to define things such as widgets etc.
  • block_server_registration - true/false flag defaults to false. By default Codename One applications register with our server, setting this to true blocks them from sending information to our cloud. We keep this data for statistical purposes and intend to provide additional installation stats in the future.
  • ios.project_type - one of ios, ipad, iphone (defaults to ios). Indicates whether the resulting binary is targeted to the iphone only or ipad only.
  • ios.statusbar_hidden - true/false defaults to false. Hides the iOS status bar if set to true.
  • ios.prerendered_icon - true/false defaults to false. The iOS build process adapts the submitted icon for iOS conventions (adding an overlay) that might not be appropriate on some icons. Setting this to true leaves the icon unchanged (only scaled).
  • ios.application_exits - true/false (defaults to true). Indicates whether the application should exit immediately on home button press. The default is to exit, leaving the application running is untested at the moment.
  • ios.interface_orientation - UIInterfaceOrientationPortrait by default. Indicates the default initial orientation, one of: UIInterfaceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight
  • rim.askPermissions - true/false defaults to true. Indicates whether the user is prompted for permissions on RIM devices.