Title: Java History
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER

Java in History

It's helpful to take a quick look at the history and evolution of programming languages to appreciate where Java fits in the computer industry.

Programming Languages Overview:

Machine Language Stage - Programs targeted to a specific computer chip. Language very low level. Using machine language provided opportunities for efficient code, but the code could difficult to comprehend. In these days, the computer hardware was expensive and programming labor was cheap in comparison. So it was reasonable to spend lots of human hours to optimize the usage of the expensive computer hardware.


    LDA   Rows
    MUL   10
    ADD   50
    STO   Index


First Languages (Fortran and Cobol ) - Higher level languages which gave you the abilities to define mathematics, simple logic, and loops in a more human friendly format. The idea was to have a more human friendly language converted into a computer chip's machine language using a computer chip specific compiler. Some efficiency is lost in this approach, but the code is so much more readable. Also it is possible to write a program that could run on different computer chip architectures. The program needed to be recompiled into the specific machine language. So each computer chip architecture required its own compiler. Fortran was the language preferred by more scientific applications, while Cobol was the preferred language for business oriented applications like banks.


    Index = Rows * 10  + 50


Why do we need new programming languages. Why didn't we stick with Fortran and Cobol forever?

Early 1970's | Today
Memory : 64K for a large main frame that filled a room with hardware. | Typical memory size for a Laptop - 4 Gig (64,000 times the memory on a huge main frame in 1970).
CPU time was expensive ... $300/hour. Programmer time relatively cheap. Worth while to do anything possible to make a program run faster. | CPUs are a lot cheaper and more powerful than in the 1970's. Programmers are a lot more expensive relatively speaking.
Do anything you can to fit into memory and spend programmer time to make the CPU more efficient. Even if the program is less readable and harder to maintain | CPUs and memory are cheap and programs that we expect to run are much larger and more complicated. We need to do whatever we can do to make programs more readable and easier to develop, so we can better utilize Programmer time.

More structured languages (examples: Pascal, C) - Newer languages were invented that provided programmers with better mechanisms for defining data structures, and other key programming characteristics. For example a programmer could define a structure of type Student which contained first name, last name, birthdate, gpa, major, etc. We could then talk about having a variable of type Student instead of a bunch of int, string, floating point variables for each of the Student's characteristics.

Object oriented programming (example C++) - As memory became cheaper, the programs written became larger and more complex. To write these more complex programs required larger teams of programmers. To succeed on such large projects required more discipline to maintain clean programming designs, and better ways to maintain and diagnose the final product. Proper usage of object oriented programming gives a programmer some powerful tools(classes and objects) for breaking down a large project into many smaller pieces. Each of the smaller pieces can be farmed out to a smaller team, and each smaller piece can provide a public interface while maintaining private data which is only manipulated by software associated with the smaller piece. The bigger the project, the more important it is to break the project into smaller pieces which have clean interfaces with the over all project. Note that C++ is effectively a superset of C, and C++ usually follows the previous approach of having a separate C++ compiler for each computer architecture.

History: - It turns out that the concept of working with classes and objects has been around for a while (before c++). SmallTalk was a programming language that was developed in the 1970's that developed a lot of the class and object concepts that most languages now use. The language "C" was invented around 1970 as well. C++ was based on the "C" language. C++ added the concept of objects to the language "C" and many of these concepts were borrowed from SmallTalk. C++ chose a different syntax than SmallTalk, but the SmallTalk influence is recognizeable. As you will see, C++ provided a lot of the concepts later used in Java and C#.

Note there is another branch from the "C" language and SmallTalk. It's called Objective-C. In many ways Objective-C follows the influence of "C" and SmallTalk more closely. Objective-C originated with a company in the 1980s called Next. The Apple corporation under the influence of Steve Jobs bought into the idea of using Objective-C as a key language for all of the Mac software including (Macs, IPhones, and ITablets).

Interpreted Language approach (Java) - The Sun corporation saw the need to develop a different approach to programming. Instead of compiling to native assembly code, the idea was to compile to an intermediate interpreted object output. The Java language itself borrowed a lot of the good things invented in C++. They didn't borrow a few C++ things that the Java inventors didn't feel were necessary or might be confusing, etc. Also Java added some features which were never in C++. Because of the approach taken with Java, the output of the Java compiler (interpreted code) can be run on any machine which has an appropriate Java Virtual Machine (JVM). A JVM is just a program that reads the interpreted object output file and executes it. There are JVM programs for PCs, Macs, Linux, etc. So in the Java world, we say "Write once in Java and run it on any platform that has a JVM program". Today, programmers are expensive relative to CPU time. Java makes programmers more productive. There is some efficiency loss because of the interpretative nature of the language. However, more programmer errors are caught much earlier than in languages such as C++.

Microsoft and C#- The Microsoft OS was heavily invested in C++ at one time. They saw the virtue of a language like Java where it's easier to create maintainable code. Microsoft at one point created a language which was called J++ which was going to be their version of Java. J++ would be like Java, but support necessary Microsoft features like Active-X. The Sun corporation sued Microsoft because J++ would allow programmers to create a Java program that would only run on a Microsoft platform if it used Active-X. Note that Microsoft had signed some Sun agreement earlier promising to adhere to the platform independence of Java. Microsoft backed away from the J++ language and came up with a the C# language to fit their needs. C# is a lot like Java, but it has lots of Microsoft specific things added to it. Microsoft invented the .NET architecture which contains a Microsoft specific object format for interpreted languages on a Microsoft platform. Microsoft has embraced the idea of having many compilers for any language you like (C++, C#, VB, Fortran, Cobol, etc.). The Microsoft paradyme is "You can program in any language you want as long as you run on a Microsoft platform".

Last Modified: July 15, 2013 4:16 PM