Section 0.6. Why Java?


[Page 8 (continued)]

0.6. Why Java?

Originally named "Oak" after a tree outside the office of its developer, James Goslin, Java is a relatively young programming language. It was initially designed by Sun Microsystems in 1991 as a language for embedding programs into electronic consumer devices, such as microwave ovens and home security systems. However, the tremendous popularity of the Internet and the World Wide Web led Sun to recast Java as a language for embedding programs into Web-based applications. As you will recall, the Internet is a global computer network, and the WWW is the portion of the network that provides multimedia access to a vast range of information. Java has become one of the most important languages for Web and Internet applications.


[Page 9]

Java has also generated significant interest in the business community, where it has proved to have tremendous commercial potential. In addition to being a useful tool for helping businesses to promote their products and services over the Internet, Java is also a good language for distributing software and providing services to employees and clients on private corporate networks or intranets.

Because of its original intended role as a language for programming microprocessors embedded in consumer appliances, Java has been designed with a number of interesting features:

  • Java is object oriented. Object-oriented languages divide programs into separate modules, called objects, that encapsulate the program's data and operations. Thus, object-oriented programming (OOP) and object-oriented design (OOD) refer to a particular way of organizing programs, one which is rapidly emerging as the preferred approach for building complex software systems. Unlike the C++ language, in which object-oriented features were grafted onto the C language, Java was designed from scratch as an object-oriented language.

    Object-oriented languages


  • Java is robust, meaning that errors in Java programs don't cause system crashes as often as errors in other programming languages. Certain features of the language enable many potential errors to be detected before a program is run.

  • Java is platform independent. A platform, in this context, is just a particular kind of computer system, such as a Macintosh or Windows system. Java's trademark is "Write once, run anywhere." This means that a Java program can be run without changes on different kinds of computers. This is not true for other high-level programming languages. This portabilitythe ability to run on virtually any platformis one reason that Java is well suited for WWW applications.

    Platform independence


  • Java is a distributed language, which means that its programs can be designed to run on computer networks. In addition to the language itself, Java comes with an extensive collection of code librariessoftware that has been designed to be used directly for specific types of applicationsthat make it very easy to build software systems for the Internet and the WWW. This is one of the reasons why Java is so well suited for supporting applications on corporate networks.

  • Java is a secure language. Designed to be used on networks, Java contains features that protect against untrusted codecode that might introduce a virus or corrupt your system in some way. For example, once they are downloaded into your browser, Web-based Java programs are prevented from reading and writing information from and to your desktop computer.

Despite this list of attractive features, perhaps the best reason for choosing Java as an introductory programming language is its potential for bringing fun and excitement into learning how to program. There are few other languages in which a beginning programmer can write a computer game or a graphically based application that can be distributed on a Web page to just about any computer in the world. The simplicity of Java's design and its easily accessible libraries bring such accomplishments within reach of the most novice programmers.

For example, we will work on projects throughout the text that involve games and puzzles. We start out in Chapter 2 by designing very simple games that involve storing and retrieving data. As we learn more sophisticated programming techniques, we gradually build more complexity into the games and puzzles. For example, we learn how to create interactive, two-person games in Chapter 4. In Chapter 8, we develop some games and puzzles that are played on virtual game boards. Finally, in Chapter 14 we learn how to introduce games with multiple players on different computers. To get a look at where we are headed, you might want to visit the authors' companion Web site to try out some examples:


[Page 10]

http://starbase.trincoll.edu/~jjjava/games/ 





Java, Java, Java(c) Object-Orienting Problem Solving
Java, Java, Java, Object-Oriented Problem Solving (3rd Edition)
ISBN: 0131474340
EAN: 2147483647
Year: 2005
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net