|
An Introduction to Java
Java is an object-oriented programming language developed by Sun Microsystems, a company otherwise best known for its high-end Unix workstations. Modeled loosely after C++, the Java language was designed to be small, simple, and portable across platforms and operating systems, both at the source and at the binary level.
The origins of Java James Gosling, Patrick Naughton and a group of engineers at Sun Microsystems, Inc. were interested in designing a small computer language that could be used for consumer devices like cable TV switchboxes. Given the lack of memory capacity, and also the fact that such devices are short on power, the language needed to be very small and generate very tight code. Further, to accommodate different Central Processing Units (CPUs), they knew they could not tie themselves to any single architecture. The project was given the code name "Green". The requirement for small, tight code led the team to resurrect the model that a language called UCSD Pascal had tried in the early days of PCs and that Niklaus Wirth had previously pioneered. The idea was to design a portable language that generated intermediate code for a hypothetical machine (often called a 'virtual machine'). This could then be used on any machine that had the correct interpreter. Since both the code and its interpreter could be really small, the main issue of size was solved. Sun and its people are from a Unix background, hence they based their language on C++ rather than Pascal. The idea was to make it fully object-oriented. Gosling (presumably loving the way the Oak tree outside his window looked at Sun) named his language "Oak". This was 1991. The efforts of the team came out in 1992 under the name '*7'. This was an extremely intelligent remote control. It had the power of a SPARCstation in a box that was just 6" by 4" by 4". Unfortunately no one was interested in producing this at Sun and from here started the battle to sell the technology. The Green Project (now christened as "First Person, Inc.") spent all of 1993 and a fair amount of 1994 looking for a customer ready to buy the technology. Patrick Naughton accumulated 300,000 miles trying to market and sell the technology. First Person was dissolved in 1994. While all of this was going on, the internet was getting bigger and bigger. Marc Andreessen, an undergraduate student on a work-project at the University of Illinois, helped create 'Mosaic' - which quickly became the most commonly used browser. Its ease of use helped the internet attain an ever-greater popularity. The language developers at SMI realized that they could come up with a really cool browser by putting their technology to work inside it. So they did. Patrick Naughton and Jonathan Payne built the actual browser and it evolved into the 'HotJava Browser'. It was written in Java to show off its capabilities and the power of what we now refer to as 'applets'. This 'proof of technology' exhibited at SunWorld in May 1995, and quite suddenly interest in Java mushroomed. In January 1996, Netscape 2.0 was released, Java enabled. And from then on everyone followed suit. Microsoft was not to be left behind, but did not follow the general consensus and came up with its own implementation (it later distanced itself from Java, preferring to create its own parallel technologies). The first version of Java as a programming language and development kit was released by Sun Microsystems later in 1996 and was quickly followed by 1.02 after just a couple of months. However, Java was not yet ready for prime time, although at the JavaOne conference that year Sun came out with a clear vision for the future. However, it took almost two more years to get it to perform adequately and deliver on the promise of 'write once, run anywhere'. The collaboration with Netscape continued, with Netscape helping to write the Swing GUI packages. The release of Java 1.2 in 1998 at the JavaOne conference was the breakthrough. It was amazing, though people were still skeptical, how in such a short span of time so much had been achieved. Java transformed from early toy-like GUI and graphics toolkits into a sophisticated language with a comprehensive library. Java had finally arrived.
Java Today Java's goals from the beginning were to be small, fast, efficient, and easily portable to a wide range of hardware devices. It is these same goals that made Java an ideal language for distributing executable programs via the World Wide Web, and also a general-purpose programming language for developing programs that are easily usable and portable across different platforms. This is the major reason why Java is said to be the most successful platform independent language. Java as a language has significant advantages over other languages and other programming environments that make it suitable for just about any programming task. Some of them are listed below.
The Java platform provides all the essentials:
It was, or at least used to be, said that Java is slow. However, the introduction of JIT ('Just In Time') technology in the Java interpreter has helped close the gap on fully compiled languages. In reality, most programs spend most time waiting for user input. Although Java will not be first choice for situations requiring large-scale, real-time computation, for most applications Java is a very good choice. Its robustness, being less prone to programming errors, and being easier to write and maintain, give Java the speed advantage when it comes to software development. So, from small beginnings, Java has evolved to become a multi-purpose language that has grown to ever greater popularity - and for good reasons. Computer programming is not an easy, run-of-the-mill task. One needs a special aptitude to do it. You may not be required to know every class and method listed in the Java Application Programming Interface, but you do need to know some basic ones in order to put Java to real work. You will also need to know the syntax of Java and also an understanding both of object oriented design and good programming practice. TJI's guide will help you with all that.
|