| < Day Day Up > |
|
For nearly two decades, we used the PC extensively. The reference model of the PC is shown in Figure 25.1. The PC runs on hardware dominated by one company: Intel; above the hardware runs the OS, dominated by another company: Microsoft. Above the OS run the applications that can be developed using any of the programming languages—C, or C++, or Java. As shown in Figure 25.2, we can achieve language-independent software development. However, note that this framework works for one platform—the Intel-Microsoft platform.
Figure 25.1: PC reference model.
Figure 25.2: Language-independent software development.
Prior to the Java era, software development involved lots of porting. If an application has to run on different platforms, the source code has to be modified on the new platform and then executed. Java, through its platform independence, has given a new paradigm in software development: "write once, run anywhere." As shown in Figure 25.3, the Java compiler converts the source code into bytecode, and the bytecode is platform independent. This bytecode can be interpreted by a Java Virtual Machine (JVM) that runs on Windows, Unix, Mac, and so on. We no longer need to port the source code; all that is required is to have a JVM for different platforms. However, note that this framework works for one language— the Java language.
Figure 25.3: Platform-independent software development.
Note | The Java programming language has revolutionized software development. Java is the driving force behind Sun Microsystems' slogan "The network is the computer." Java facilitates "write once, run anywhere." |
Java's main attraction is that the bytecode can be downloaded from the network and executed on the local machine. This is an important paradigm shift— the code moves on the network. However, when the code moves from the network to the machine, we need to ensure that there is no security violation—the code should not corrupt the data in the local machine. As shown in Figure 25.4, the bytecode verifier will ensure that there is no security violation, and the bytecode interpreter (which can run on the browser) will interpret the bytecode. Instead of a bytecode interpreter, which is slow, a Just In Time (JIT) compiler can be used. This framework, coupled with object-oriented features of Java, has brought on revolutionary changes in software development.
Figure 25.4: Executing a Java applet.
Software developed on one platform can run on another platform if the Java programming language is used. The bytecode generated by a Java compiler is platform independent. This bytecode is interpreted by the Java Virtual Machine that runs on different platforms.
The software component–based software development is now catching up. In hardware, if we have to create a design, we look for readily available components and interconnect them to obtain the desired hardware functionality—the days of discrete design are gone. Such an approach has not been there in software development—for every application to be developed, we do the development from scratch. With the advent of software components, we can select the readily available components and interconnect them to obtain the necessary software functionality. A software component is shown in Figure 25.5. The component interfaces with the other components through properties, methods, and events. The internal structure of the component is not visible to the external entities. The software component can be completely defined by its external interface. This component framework has an important advantage—the components can be anywhere on the network, and it is not necessary to have them only on a single machine or on a server. Distributed component platforms such as DCOM and CORBA use this framework for software development.
Figure 25.5: Software component.
Software development can be done very fast using the concept of software components. Developing a software package is just the integration of different components—conceptually it is similar to hardware development, wherein we use readily available components to develop a system. Each software component is defined by its external interfaces.
| < Day Day Up > |
|