Chapter 2. A Quick Tour of the Java Platform

Few programming technologies have generated as much interest and excitement, in both the academic and commercial worlds, as the Java platform has in recent years. More and more universities are using Java as the primary language to teach programming, and many enterprises are switching to the Java platform for developing their enterprise applications. What is so attractive about it?

  1. Java is a modern object-oriented programming language. Java is not only object-oriented, it is also considered a relatively safe language with protection against buffer overflows and an absence of dangerous pointers. The built-in garbage collector allows much simpler memory management architecture within applications and much faster development and debugging. It is well established that object-oriented programs are modular, promote reuse and are easy to understand, extend and maintain.

  2. Java is designed around the principle of WORA (Write Once Run Anywhere). A compiled Java program consists of byte code capable of running within a JVM (Java Virtual Machine), independent of the target machine hardware architecture and Operating System. A JVM can be thought of as a portability layer that allows the same Java program to run on many different hardware and operating systems. This is a great benefit to software developers who want to run their applications on multiple platforms. In practice, differences exist among different versions of the Java platform and among platforms from different vendors, making seamless portability hard to achieve. Still, it is much simpler to move a Java application from one environment to another compared to a C/C++ program.

  3. JIT (Just In Time) compilation, runtime optimizations and advances in garbage collection have made Java performance acceptable for many more applications. Historically, Java programs have been considered slower than natively compiled programs written in languages such as C/C++. However, continued advances in JVM technology and optimizations in runtime libraries have brought Java performance close to natively compiled programs.

  4. The Java platform is a complete application development and execution environment with a rich collection of APIs or libraries. The real power of the Java platform rests with its vast collection of libraries with well-designed APIs, making it much simpler and faster to develop complex applications. We talk more about these libraries in later parts of this chapter.

  5. The Java platform is a set of specifications separate from implementation. There are many vendors of Java platforms, all supplying implementations satisfying one set of specifications. These vendors participate in the evolution of Java specifications through JCP (Java Community Process), an organization setup by Sun Microsystems to evolve the Java platform and compete on quality of their implementation, ensuring continuous innovation and choice to consumers.

  6. Java is designed for secure development and deployment. It is often said that security is incorporated in Java from the ground up and not added as an afterthought. As we soon see, there is sufficient substance behind this claim.

  7. Java scales from tiny cell phones to heavy-duty data center machines. This is certainly true for the Java language. The differences in the operating environment and required libraries are addressed by having different editions of the platform for different target environments.

  8. The Java platform has unique capabilities to ease program development and deployment. A number of useful programming abstractions, such as reflection to query the internal structure of classes at runtime; serialization to store or transmit objects; specialized APIs such as servlets, EJBs (Enterprise Java Beans) and their respective containers and so on, have evolved within the Java platform.

You might have noticed that we have used the terms Java and the Java platform in slightly different contexts. This is intentional. We have Java, the programming language and we have the Java platform, the complete development and execution environment with its rich set of abstractions, libraries and tools. And though Java is a fine programming language, much of the excitement is around the Java platform. This chapter is devoted to a quick tour of the Java platform, with the assumption that you already know Java, the programming language.

You are probably familiar with the Java platform. Some of you may even be experts with many years of experience in developing Java-based systems, and may feel that (a) an introductory chapter is not needed; and (b) a single chapter cannot do justice to the vastness of Java. You are right. This chapter and the book assume a fair degree of familiarity with the Java platform. What we are going to do is to make an aerial tour of the Java landscape, pointing out security aspects of individual APIs and their interconnections. The way even a longtime city dweller learns a few new things about his or her city by taking an aerial tour, you may also come across a thing or two that you had not been aware of.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.47.230