Hello Android devs!

I recently bought a Motorola Razr Maxx, and then shortly after an Asus 
Transformer Infinity TF700T.... I suppose it goes without saying that I 
like the idea behind Android as an OS. But I'm a little curious about the 
architecture decisions, and thought this would be the best place to ask.... 
As far as I know this is the only "official" Google forum for Android OS.

As someone who has always built my own PCs from scratch, I have a pretty 
decent idea about hardware architecture. While I run Windows as my main OS, 
I've experimented with Linux and BSD on occasion (with mixed and often 
disappointing results, due to the hardware I choose). I'm no stranger to 
digging into the OS and tweaking as I see fit. So after grabbing the 
Android SDK and digging more into the architecture, one huge question is 
baffling me....

Why Java?

If my understanding of Apple products is accurate, iOS is based on FreeBSD 
with Apple specific hardware drivers and Cocoa. It's my understanding that 
Cocoa is a native set of classes that function in a similar way as GTK+ or 
QT, but developed "in-house" at Apple.

So why did Google choose to implement Android as a barebones Linux Kernel, 
with phone/tablet specific drivers and a Java VM? Linux already has a 
fantastic security model, which (in my opinion) reduces the benefit of a 
sandboxed (virtual machine) environment. And a virtual machine, by 
definition cannot possibly perform as well as native code - even if it IS a 
hand optimized version.

In deciding to use Java as it's primary application architecture, it 
appears to me that Google crippled Android from the get go. The fact that 
the NDK exists at all is a good indication that Java was not the ideal 
solution.

C/C++ has always been a relatively robust language to design cross-platform 
applications - with some effort and preprocessor directives. Java 
is definitely _more_ portable, but who uses Android apps, but Android 
users? I just don't see that Java was the best way to implement an OS. 
Embedded developers design software for 2 platforms: iOS and Android. Using 
Java as the primary architecture forces developers to do far more than 
include different preprocessor directives and libraries - apps have to be 
redesigned from the start, even using NDK. In fact NDK is kind of a joke - 
using a VM to execute native code within it's context - of course there's 
no performance increase, though there's a huge increase in complexity!

So why didn't Google choose a similar route as Apple? Creating a framework 
like Cocoa based on a Linux kernel (and using native c/c++ code)?

If I'm off in left left or simply missing some major point, I'm more than 
happy to learn!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to