What is JVM and Why it is Worth to Develop Apps on Java Platform

The history of Java began in 1995, when the first version of this programming language was released. “Write Once, Run Anywhere” (WORA) was the slogan of the new language. This meant that Java was not just another programming language, but a whole platform which you could use to build applications for everything, from powerful servers in data centers to a coffee machine in your kitchen.

How does it work?

A software engineer writes a program in the Java programming language, however computers do not understand Java. They speak their own language – machine codes. In order to translate the program from the language a programmer understands, whether it is Java, C, Go or any other language, to the machine codes, special programs are used – compilers. And that raises a problem. There are different types of hardware and different computers speak different dialects of machine codes. So, you can not run the compiled program on any computer. You will have to translate the program into each dialect separately.

The point is that instead of translating the program into machine codes, the Java compiler converts it to an intermediate language called bytecode. And this bytecode is the secret ingredient. It is executed not on the hardware itself, but on a JVM (Java Virtual Machine). What is JVM and why it is needed? JVM is a special software that serves as a translator from bytecode to the language of machine codes. Install a JVM on your phone – here’s a mobile app. Want a web application? No problem, install Java virtual machine on the server and run your website with photos of pets.

It has been more than 20 years since the rise of the Java platform and you know what? It is still thriving and evolving. For many years, Java has been holding the first spot in the TIOBE index of programming language popularity, only sometimes giving way to the ancient titan of the programming world – the C language. So, what is so good about building applications for the JVM and why choose Java for your projects?

Advantages of Java virtual machine

Independence from platform

As mentioned above, applications written in Java can run on Windows, on Linux, or even on a refrigerator. The main thing is to have a JVM installed on the device.

Security

Since a program written in Java runs inside a virtual machine, it is isolated from the operating system. No external process can access the application data if the virtual machine does not allow it. By the way, the security settings in the JVM can be flexibly configured, so the boundaries of what is permitted are under our complete control.

A mature ecosystem and a massive community of developers

After 20 years of continuous development, Java has libraries and frameworks for every taste. A programmer does not need to reinvent the wheel, it is enough to take a set of existing solutions and assemble the required functional from them. For business owners, this means saving time and money on application development. It also ensures that there will be no shortage of Java developers.

Modern multifunctional IDEs

Although this point is more important for developers, it improves their productivity. In its turn, this also reduces the development time. A good quality and well-tuned IDE is a continuation of the developer’s hands, it allows him to focus on coding and to not worry about other stuff.

IntelliJ Idea, Eclipse and NetBeans are the three most popular IDEs for Java application development today. IDEs have a bunch of tools for the developer. They can integrate with libraries, frameworks, build systems, do lots of other things, except that they have not yet learned to make coffee. IntelliJ Idea, which is my IDE of choice, keeps on surprising me with unexpected useful features until now, even after 4 years of using it.

Performance

There are many myths about the low performance of Java. The roots of these myths come from the origins of the language in 1995-2000, when Java was young and not quite efficiently implemented. Since then, over 15 years have passed. During this time there have been made many changes and improvements in the JVM.

Modern Java is not inferior in performance to other languages, and sometimes even surpasses them in speed. For the extreme cases, when you need to make the most of the hardware, there is an option to write a performance-critical part of the application in a lower-level programming language. Then, this part can be integrated with the rest of the application written in Java.

Not only Java

Despite the fact that Java is a modern language that continuously develops and improves, some people dislike it for excessive verbosity and lack of expressiveness.

The thing is that Java has long been a purely object-oriented programming language. Unfortunately, the paradigm of pure OOP has outlived itself. The complexity of the systems being developed has greatly increased and the OOP itself is no longer able to cope with such complexity.

Fortunately, the paradigm of functional programming, emerged in the middle of the last century, came to the aid. However, since Java was not quick to adopt the ideas of functional programming, there began to appear other languages that used the FP to combat the complexity of systems and to give the language a more expressive syntax.

Among these languages are: functional to the core Clojure, dynamic Groovy, pragmatic Kotlin and Ceylon, reactive and scalable Scala. There are also numerous adaptations for JVM of other programming languages such as Ruby, JavaScript, Pascal, PHP and Python. Everyone can choose the language that suits them best for a quick and effective solution of tasks.

Success stories

In support of the above, I would like to give a few examples of projects implemented by us on the Java platform.

STAV Online - an online platform for teaching and learning the national language in Danish schools. Training is conducted using the gamification technique: instead of books – game worlds and bonus points will be a reward to the diligent student. The teacher can track the progress of both the class as a whole and individual students. Since students and teachers work with the application mainly from tablets, the application is also adapted for mobile devices. At the moment, the application serves more than 10 thousand students and over a thousand teachers.

Nobody likes errors in applications and there are QA testers whose role is to find glitches and bugs. After detecting an error, testers have to describe its symptoms and steps to reproduce the bug. They can, of course, do this on paper, but we live in the age of digital technologies. Therefore, we developed the QA Assistant app for our testers, which provides a convenient interface for describing bugs, creating test scenarios, reporting and other QA activities. You can find more information about this project in our portfolio.

Everyone likes to play games and our developers are no exception. However, since we are not only players, but also software developers, we have some games written in Java in our portfolio as well. Here, for example, a remake of video game classics - Snake, which we developed for one of our customers. The game is available on Google Play. And here is the clone of the Plumber puzzle in a somewhat unusual implementation. Instead of pipes are wires, instead of cranes – bulbs. The game is available on Google Play and the App Store.

Outcomes

JVM is a modern, mature, reliable and stable platform that allows developing applications of any complexity and purpose. Development on JVM saves time and money for the business owner, and also brings pleasure to the developer. A satisfied developer is an effective developer. Applications written for the JVM are safe, productive and reliable and they can be easily transferred to various hardware platforms.

Is it worth to develop your product in Java? Definitely it is! At least try it, you will like it.

Anadea

TAGS:
 
 

Popular posts

Related posts