home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


What Makes Java Different from Other Languages?

Sun boasts that Java is a concurrent, object-oriented programming language with client/server capabilities. In this section, we’ll take that claim apart and examine each of Java’s major distinctive qualities.

Java Is a Programming Language In the late 1990s, the world of software is similar in many ways to the way things were in the late 1970s. In those days, PCs had just come out, and the available software lagged far behind the demand. However, nearly every model of PC shipped with a BASIC interpreter. Thousands of people who did not consider themselves professional programmers—teachers, life insurance agents, bankers—learned BASIC and began to write programs. Often they would share their programs by floppy disk or, later, by electronic bulletin boards—and the shareware industry was born.

Like SmallTalk, C, and C++ (and unlike BASIC), Java is designed for use by professional programmers. Today the Hypertext Markup Language (HTML) and the scripting languages, such as Netscape’s JavaScript, occupy the niche formerly held by BASIC. Many people who do not consider themselves to be professional programmers cannot write Java applets, but they can use applets written by others to add life to their Web pages. Often they use Netscape LiveConnect, an integration technology based on JavaScript, to stitch Web pages, Java applets, and browser plug-ins together.


After you’ve learned Java, you may also want to learn how nonprogrammers can use your applets in their Web pages. Read Special Edition Using JavaScript, 2nd Edition (Que, 1997) to learn this powerful scripting language. Then read Special Edition Using Netscape LiveConnect (Que, 1997) to learn how to integrate JavaScript with Java applets.

But this section is about Java. Unlike JavaScript, Java was designed for the experienced programmer. If you’re a professional programmer, you should have little trouble learning Java. If you don’t have prior experience with the object-oriented techniques, you’ll want to brush up on the object-oriented concepts.


For more information on the object-oriented methods, see Using Java 1.2 (Que, 1998). Chapter 7, “Object-Oriented Analysis: A New Way of Looking at Software,” and Chapter 8, “Object-Oriented Design and Programming,” will help you come up to speed on the latest techniques.
If you’re not a programmer, but you’re prepared to work hard, you can use Java to learn how to program. You’ll want to refer to some of the basic programming concepts described in Using Java 1.2, Appendix A, “Introduction to Programming.”

Java Is Object Oriented In general, software engineers engage in five activities during the development of software:

  Analysis—The process of identifying user requirements
  Design—The process of developing a solution to the user’s needs and requirements
  Implementation—Coding the design in a computer language such as Java
  Test—Ensuring that the finished software satisfies the requirements
  Maintenance—Fixing latent defects, adding new features, and keeping the software up to date with its environment (such as operating systems and database managers)

During object-oriented analysis, you are encouraged to view the application domain as a set of related classes. In a transportation application, for example, there might be a class called Truck. When the application runs, it typically makes instances of these classes. You might build a fleet of trucks based on class Truck.

During initial object-oriented design, you identify all the classes, typically arranging them in a hierarchy. Figure 36.3 illustrates where the class Truck might fall in a transportation hierarchy. You also identify methods and data that should be associated with each instance. Figure 36.4 illustrates one way of recording this information during the design activity.


FIGURE 36.3  As designer, you will identify a hierarchy of classes in your application.


FIGURE 36.4  For each class, identify the data that each instance should store and the methods for each class.

After you’ve identified and described each class, you need to design the code for each method. Some designers prefer to write simple diagrams to show how each method should be written. Others prefer to write pseudocode, a loose method of coding that is intended to be read by humans rather than by the compiler.

Object-oriented languages were introduced as early as 1967. During 1983, Bjarne Stroustrup of AT&T Bell Laboratories introduced a version of the popular C programming language that supported classes. This “C with classes” went on to become C++, the most popular object-oriented language ever—possibly the most popular computer programming language ever.

The people at Sun Microsystems who designed Java were C++ programmers. They understood the features of C++ that have made it a good language. They also understood its limitations. In designing Java, they copied C++ syntax and reused the best pieces of C++’s design, including the fact that it makes it easy to code object-oriented designs.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.