Friday, November 23, 2007

Fragmenting Java

One of the biggest issues with Android is the issue that it fragments Java. As Java ME is already different from Java SE one can argue that fragmentation has already happened. What I was originally hoping for Android would have been support for Java SE which would have made porting to Applets much easier. Right now, I am going about projects in a similar way to when I was doing C/C++ coding. Cross platform coding consisted of writing a lot of generic classes while putting platform specific code into it's own classes which can hopefully be accessed in a generic way. The problem with this technique is that when you are under a tight deadline, you suddenly stop worrying about cross-platform compatibility and just start writing for the biggest platform with plans on making the code cross-platform when you have time. Of course, you never have enough time and the code base gets more platform specific and your initial noble goals vanish.

The API for Android is very clearly for Android. All the android specific classes are in packages with the Android prefix, so people who are claiming that Google is doing what Microsoft did are quite mistaken. Microsoft's platform specific extensions were not clearly distinguished making it very easy to accidentally write code that was platform specific without realizing it. More to the point, with Android, you are not actually writing java code but are just using java as your programming language and generating Dalvik code instead of JVM code.

No comments: