New things in the upcoming release

There will be a proper announcement later, but here's a list of some of the upcoming features in the new elements:

  • Updated Documentation, a work in progress but already a huge improvement over the old wiki documentation.
  • Shared Projects: Share code easily between .net, java and cocoa with a shared project, no need to use links to add files between the different projects, just reference the shared project and it wil become part of your project. Files in a shared projects also have a conditional property, that you can use to make a file only be compiled on some platforms/projects with conditionals.
  • EUnit: Cross platform unit testing
  • Operator support on Cocoa and Java
  • Overloading methods by their type in Cocoa
  • Lazy properties; properties that are initialized once but only when you first access them.
  • Extract method refactoring
  • managed structs on Cocoa: Structs that can hold strong types.
  • not nullable types, types that are not allowed to have the null/nil value Oxy C#
  • Generic type aliases
  • Lots of improvements for the Fire IDE.

How the RemObjects Elements targets work

RemObjects Oxygene and RemObjects C# have 3 targets, the .NET, Cocoa (OSX/iOS) and Java (Android) targets. Each of the targets are unique, there's no interpretting from 1 to another, even though the original target was .NET. Internally the compiler reduces each of the C# and Oxygene elements to low level elements, that is, for loops become while loops, try/finally is converted to try/except on platforms that don't have a finally (like Java), using to a try/finally, etc. Then the targets convert the reduced data into the platform specific code. When the compiler is done, what's left is Exit, Assignments, If, Goto, Label, Switch, Case, While, Break, Continue, Case and Try. Each target also has a "Type Loader", which deals with adding references to .dll, .fx or .jar files.The type loader deals with listing types from external sources and getting their members. The last part of each target is the Target itself, which has the unique code for each platform, including things like specifying what types translate to the system types, dealing with operator overloading and platform specific system logic.

.NET

On .NET things are converted into IL. The compiler converts each type, member, statement and expression into a low level IL constructs.

Java

For the Java target we generate a set of .class files in memory then combine it in a JAR file, which is essentially a zip file.

Cocoa

The cocoa target is more interesting, since there's no .class or clr file format that we can use, instead it's a raw executable built with LLVM. LLVM uses a very low level assembly that it optimizes and converts to native code for the target platform, of which we support 5: armv7, armv7s, armv8, x86_64 and i386. The type loader here uses .fx formats as an intermediate. fx files are also written next to libraries emitted when compiling.

The end result is that each of the targets has nice and optimized code made specially for those platforms.

RemObjects C# cross platform shared projects tutorial

I've posted a tutorial for using RemObjects C# at tutorial. This tutorial shows how to share source files between different platforms while keeping the ifdefs to a minimum, using Sugar.

Updates on my RemObjects Projects

It's been a while since I blogged about my work, and I've been way busy with all of that. Here's a list of things I worked on in the last year:

I'm also working on several new things for the coming year, keep looking here & on the RemObjects blog for news.

updates on the media player project

In my previous post about the media player project I expected several possibilities, but I found a better option for all of this, which is a simple Android Player box like the G-Box Midnight 2. I found a cheap clone of the G-Box here on dx.com, which has the exact same board and replaceable firmware.

Took a few weeks to arrive but when it did it was easy enough to replace the Android OS with Linux + XBMC which made a great media player system. Attached a disk for storage and supports WLAN/LAN, so now I've got a nice present for about 60 euro + a cheap 1 TB USB harddisk (60-70 euro).