CHAPTER 1
Insight of Versioning
Introduction
Building an application is always a challenging task. It involves working with application programming interface (API), writing business logic and developing user interface (UI). Over the years, the developers have been using several programming languages and frameworks to build various types of applications. Besides, every programming language or framework is constantly working on how it can provide better services to the developers so that they can create efficient, scalable and asynchronous applications. With traditional programming languages, such as C, C++, developers have created a plethora of applications. However, Java certainly seems to be a better programming language than its counterparts. This is particularly because of its write once, run anywhere (WORA) characteristic and other features such as, platform independence, portability, and security. Java is arguably the most widely-used programming language to develop robust, distributed and secure applications in recent days .
The journey of Java started with the Project Green commissioned by Sun Microsystems. And, since then, it is continuously upgrading itself in terms of new API updates periodically for the current market scenario.
Structure
- Different versions of Java
- New versioning: time-based release versioning
Objective
After studying this chapter, you should be able to understand the concept of versioning, different versions of Java and time-based release versioning process of the Java language.
Project Green: the beginning
In the 1990s, Sun Microsystem initiated a project to create a programming tool using C and C++. Patrick Naughton, the head of the project was joined by James Gosling and Mike Sheridan. In its initial days, the primary aim of this team was not to develop a new programming language but to program new electronic devices other than computers. The project was being designed for developing embedded systems, where languages like C++ were not responsive enough.
This made Bill Joy, co-founder of Sun Microsystem to think of a new language for this project. Working on this idea Gosling started working on enhancing C++ and launched a complete programming language. Initially named as Oak after the tree that was outside this office, it was later renamed as Java.
Developers found Java revolutionary, but that was not the end of everything. In fact, it was just the beginning. What followed next was continuous update in the API. Such updates were released as a part of different version of Java. Though most of the other languages took small incremental step for upgrading, java started to kick off the versions with a wider scope and vision.
Over the years, Java’s API has undergone many structural changes. The package-oriented programming approach is reshaped to modular programming from JDK 1.9. This approach changed the way of traditional application development thoroughly.
The original name given to Java was not Oak, it was C++ ++--, which says new features added and unwanted features were removed.
Versions of Java
It is very interesting to observe how Java is transforming from one version to another; what are the different features in a particular version; and how it is helping the developers in creating better applications.
Let us quickly walk through the different versions of Java, from its early release to JDK8.0, in this chapter. We will be extensively discussing versions 9.0, 10.0, and 11.0 in later chapters.
Version: JDK1.0
Release date: 23rd January, 1996
This is a curtain-raiser. Sun Microsystem, launched their first version of Java 1.0 with basic facilities. The codename given to this version was Oak. This included Java runtime, development tools i.e. compilers. Following were the basic features of this release:
java.lang java.io java.util java.net
Version: JDK1.1
Release date: 19th February, 1997
The prime focus of this release was to increase the stability, speed, and security of Java applications. This version contains around 700 classes with enhancements for performance, JDBC, and Java Bean support. Java had released a few updates of this version, which is also termed as minor versions of 1.1. The codenames of these versions are different for different API update like, Version1.1.6 (Abigail), Version 1.1.7(Brutus), Version 1.1.8(Chelsea). Following are the major changes that were implemented in this version:
- Java archive (JAR) file format
- Inner classes
- Internationalization
- Math package
- Object serialization
- Remote method invocation
Version: JDK1.2
Release date: 8thDecember, 1998
This version was launched in an era when the internet was booming. So, the term J2SE (Java 2 Platform, Standard Edition) was introduced to differentiate this development kit from J2EE (Enterprise Edition) and J2ME (Mobile Edition). One of the major updates in Java was that the classes reached up to 1520 bundles in 59 packages. The code name given to this version was Playground.
To improve the performance of the application, JDK1.2 introduced a few implementations:
- Faster memory allocation and garbage collection:
Memory allocation in heap was a concern, which was read by using thread-local cache. So, every time there was no need for locking the majority of the heap allocation. Also, constant strings were shared among different classes, reducing the unnecessary duplicate string object creation.
- Native libraries:
As JVM is not platform dependent, many a times the native libraries were not uniform. In this version, such libraries which supported core java classes were re-written using Java Native Interface (JNI).
- Solaris native thread support:
Java had given the ability to the kernel so that it could schedule native threads over parallel processors. This made concurrency cheaper.
The following major language changes/updates were implemented in this version:
- Collection framework:
A collection is a group of objects embedded in a single unit. Before JDK 1.2, developers were using arrays, vectors, or hash tables. Though these objects were giving the services, there were no common interfaces or methods shared between them, because of which developers were required to use different methods for accessing different collections.
To overcome this complexity, Java came up with common interface structure in the format of collection framework API. This API consists of different interfaces like set, list or map. The classes implementing these interfaces provided a common set of methods, because of which developers could use the services more effectively.
strictfp keyword: Working with floating point data type had always been vulnerable, prior to JDK1.2. Floating point data was platform dependent, because of which the precision of the floating-point data was not guaranteed. The keyword strictfp resolved this issue which follows the IEEE 754 standards.
Following were the library changes/updates that were implemented in this version:
- Just in Time (JIT) compiler implementation
- Java plug-in
- Swing graphical API
Version: J2SE1.3
Release date: 8th May, 2000
This version mainly focuses on the modifications in deployment and improvements of applet performance through Java Hotspot Client. The codename given to this version was Kestrel. Following were the major updates in this version: