Wednesday, May 11, 2016

Why Google choose Java as their programming language

Why did Google choose java for the development of Android Operating System?

Android is based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets.The Android Apps and games, which are so popular among smartphone users are compiled by developers using the Android software development kit (SDK). This Android SDK is compiled using Java programming language. So, why Google choose only Java?


1. It is almost impossible to  shoot yourself because Java use no pointer arithmetic whereas C/C++ ,Python ,C# ,Ruby on Rails use pointer arithmetic.

2.Several mobile phones already used Java ME, so Java was known in the mobile industry and the engineers.

3. Since Java follows Sandbox Security Model;Java allows developers to create sandbox applications, and create a better security model so that one bad App can’t take down your entire OS.

4. Even the most die hard of programmers and coders will agree that C and C++ are notoriously difficult to work with, and even very senior engineers make dangerous mistakes very often. This is the reason, Microsoft chose to develop its on .NET architecture, however developing a separate language for Android would not have been feasible for Google at that time.

5. Also during the time the first Android version was being worked on, the JVM/CLR languages (i.e. the Java family and the C#/.NET family) were under ownership of Sun and Microsoft respectively. So it would not have been feasible for Google to use its ‘enemies’ programming language. Only after Oracle bought out Java and Google reached an understanding with Oracle that all proprietary issues were resolved.

6.Go was used in the earlier versions of Android and found to have its limitations. Rust was smaller still, so betting Android’s whole OS’s development ecosystem on such a niche language would’ve been a bad idea.

7. For most of the tasks ,Java is faster than Python  and Google needed to provide a snappy experience on relatively unpowered phone processor so they likely didn't consider Python as a contender. 

8.Java is a known language, developers know it and don’t have to learn it. Also there are lots of engineers who specialize in Java making it easier for them to compile Apps and Games.

9.It runs in a Virtual Machine , so no need to recompile it for every phone out there and Java is easy to secure. This is Java’s very important feature. Running on a Virtual Machine thus no recompiling every time  is a huge plus. Also, it easily separates processes from each other, preventing a bad application from destroying your phone or interfering with other applications. Every App has assigned its own address. All addresses are translated by Memory Management Unit (MMU). This provides base level security to the App and the Android ecosystem by preventing leakages.

10. Since Java is the most popular programming language a  large number of development tools are available for developers. Java has huge open source support, with many libraries and tools are available to make developers life easier.

11. The speed difference was not the main issue .If it was then you Google should have code in low level programming language.







No comments:

Post a Comment