...And It Was OKNo mobile development environment is perfect, and the combination of Java and Android is no exception. In the beginning, Java, as implemented for the Dalvik virtual machine, was interpreted, without any of the just-in-time (JIT) compiler tricks regular Java uses to boost performance. This is a bigger problem in mobile, since the devices Android runs on tend to be less powerful than your average desktop, notebook, or web server. Android 2.3 added a JIT compiler, which helps a lot, but it is still slow compared to native compiled code. Hence, there will be some things you just can’t do on Android with Java because it is too slow. Java uses garbage collection to save peoplefrom having to keep track of all their memory allocations. That works for the most part, and is generally a boon to developer productivity. However, it is not a cure-all for every memory and resource allocation problem. You can still have what amounts to “memory leaks” in Java, even if the precise mechanics of those leaks differ from the classic leaks you get in C, C++, and other languages. Most importantly, though, not everybody likes Java. It could be because they lack experience with it, or perhaps they have had experience with it and did not enjoy that experience. Certainly, Java is often seen as a language for big enterprise systems and, therefore, not necessarily “cool.” Advocates of other languages will have their own pet peeves with Java as well (e.g., to a Ruby developer, Java is really verbose). So, while Java was not a bad choice for Android, it was not perfect, either.
đang được dịch, vui lòng đợi..
