Domain: robovm.com
Stories and comments across the archive that link to robovm.com.
Comments · 7
-
Re:Obligatory
-
Re:Java
If you want to run a Java program on iOS you need to jailbreak your phone first, because there is no supported and endorsed Java Virtual Machine for the platform. Early Apple terms and conditions prohibited running an interpreter, except for JavaScript in web views. Not sure where there terms and conditions are at now. Haven't tried for a while, so I'm not sure how stable these JVMs for iOS are. Even if they're rock solid, most folks don't jailbreak their iPhones, so there's not much of an audience to run them. Specialized uses perhaps.
As an alternative, for a while there was RoboVM which, rather than using an interpreter compiled to machine language using llvm. This allowed most Java programs to work, except those that use runtime byte-code instrumentation, where a new class is generated on the fly and emitted from the classloader. Something that is useful for implementing certain kinds of features, like proxying concrete classes to weave in AOP and so on.
RoboVM was a really fun project, however they were acquired by Xamarin, shortly after Xamarin were acquired by Microsoft, and consequently shut down. No statement was made, but it was presumably because Xamarin fills the same niche, and supporting a competing solution was not considered to expand the enough to offset the investment.
-
Try Kotlinlang.org
If you're developing for Android it is worth checking out Kotlin along with the Anko libs from Jetbrains.
Kotlin, by the company that provides the Android Studio platform, is built on the Java platform and adds a modern, fashionable multi-paradigm (OO, functional) syntax, fixes some gaps in the Java standard libs, adds optionals that are (IMHO) easier to read than Swift's. It seems to be the best bet for getting a modern, fashionable language on Android, ie does not add to download size, seamless operation with other libs, etc.
You can also use Kotlin as a backend language, eg with Spring Boot, and it compiles to JavaScript too, so can be used client-side. You could even use it on iOS if you wanted, with RoboVM.
I've spent the last few years developing focusing almost 100% on iOS, but am willing to give Android another try in 2016
.
-
Good point
Why not port the Java Virtual Machine, then using the MS widget set/chrome? E.g. RoboVM uses this to run Android Apps on IOS.
-
Re:One more in a crowded field
Is Swift suitable for writing applications for all? If not, developers would be writing for a limited, albeit popular platform, but limited to a certain subset nonetheless.
No, it's Apple specific. However that's OK because there's a language which is much like Swift, except it runs on pretty much every device you might have.
That language is new. It's called Kotlin, and it is from JetBrains, the makers of the highly popular IntelliJ series of IDEs (+ WebStorm, PHPStorm, RubyMine, PyCharm etc).
Kotlin targets the JVM and JavaScript. It interops perfectly with Java. That means code written in it runs on Windows, Mac, Linux and Android. Additionally, via the RoboVM project, JVM bytecode can be compiled to native ARM iOS/OSX binaries. There is no JIT compiler. RoboVM provides bindings to all Objective-C APIs on iOS so you can build native UIs and access all the same functionality as a native app. Programs written this way are on the app store, so Apple is cool with the technique.
Kotlin has a clean, concise syntax and many modern features that match those in Swift. For example it has nullability/optionality integrated with the type system. It has Markdown comments. It has extension functions. It has some support for pattern matching. It has named parameters. It has the ability to define "data classes" that have easy immutability, content equality, hashcodes, serialization etc all in a single line of code. It has type inference and compile-time inlined lambdas, so you can do high performance functional programming with it. It has features to support complex DSLs. It has a full IDE with many built in refactorings, online static analysis, and via the JVM it has high quality CPU/memory profilers and debugging support.
In short, programming with Kotlin is much like programming with Swift, except you have better tools, an IDE at least as strong as Xcode and in my experience stronger, and you can write apps with it that are indistinguishable from native iOS and Android apps.
-
Fairly Native on 1 platform, ported on the other
If you'd like to use your native language skills ( E.g. Java from Android ) on alternate platform ( e.g. IOS ), frameworks can be useful. I like open-sourced CodeNameOne and RoboVM because I work on the Java side of things and my needs on alternate platforms are fairly basic. An IOS developer may easily go in the other direction.
-
RoboVM for the Java Crowd
Also RoboVM if you'd like to leverage your Java skills. Allowing you to target Android and IOS.