1.7. The Java Language Specification, API, JDK, and IDE

 
[Page 14 ( continued )]

1.6. Java, the World Wide Web, and Beyond

This book introduces Java programming. Java was developed by a team led by James Gosling at Sun Microsystems. Originally called Oak , it was designed in 1991 for use in embedded consumer electronic appliances. In 1995, renamed Java , it was redesigned for developing Internet applications. For the history of Java, see java.sun.com/features/1998/05/birthday.html.

Java has become enormously popular. Java's rapid rise and wide acceptance can be traced to its design characteristics, particularly its promise that you can write a program once and run it anywhere . As stated in the Java language white paper by Sun, Java is simple , object-oriented , distributed , interpreted , robust , secure , architecture-neutral , portable , high-performance , multithreaded , and dynamic . For the anatomy of Java characteristics, see javacharacteristics.pdf.

Java is a full-featured , general-purpose programming language that is capable of developing robust mission-critical applications. Today, it is used not only for Web programming, but also for developing standalone applications across platforms on servers, desktops, and mobile devices. It was used to develop the code to communicate with and control the robotic rover that rolled on Mars. Many companies that once considered Java to be more hype than substance are now using it to create distributed applications accessed by customers and partners across the Internet. For every new project being developed today, companies are asking how they can use Java to make their work easier.

The World Wide Web is an electronic information repository that can be accessed on the Internet from anywhere in the world. You can use the Web to book a hotel room, buy an airline ticket, register for a college course, download the New York Times , chat with friends , or listen to live radio. There are countless activities you can do on the Internet. Many people spend a good part of their computer time surfing the Web for fun and profit.

The Internet is the infrastructure of the Web. The Internet has been around for more than thirty years , but has only recently become popular. The colorful World Wide Web and sophisticated Web browsers are the major reason for its popularity.

The primary authoring language for the Web is the Hypertext Markup Language (HTML). HTML is a markup language: a simple language for laying out documents, linking documents on the Internet, and bringing images, sound, and video alive on the Web. However, it cannot interact with the user except through simple forms. Web pages in HTML are essentially static and flat.

Java initially became attractive because Java programs can be run from a Web browser. Java programs that run from a Web browser are called applets . Applets use a modern graphical user interface with buttons, text fields, text areas, radio buttons , and so on, to interact with users on the Web and process their requests . Applets make the Web responsive , interactive, and fun to use. Figure 1.8 shows an applet running from a Web browser.


[Page 15]
Figure 1.8. A Java applet for computing loan payments is embedded in an HTML page. The user can use the applet to compute the loan payments.

Tip

For a demonstration of Java applets, visit java.sun.com/applets. This site provides a rich Java resource as well as links to other cool applet demo sites. java.sun.com is the official Sun Java website.


Java can also be used to develop applications on the server side. These applications, called Java servlets or JavaServer Pages (JSP) , can be run from a Web server to generate dynamic Web pages. The Self-Test website for this book, as shown in Figure 1.9, was developed using Java servlets. The Web pages for the questions and answers are dynamically generated by the servlets.

Figure 1.9. Java was used to develop the self-test in the Companion Website for this book.


[Page 16]

Java is a versatile programming language. You can use it to develop applications on your desktop and on the server. You can also use it to develop applications for small hand-held devices, such as personal digital assistants and cell phones. Figure 1.10 shows a Java program that displays the calendar on a BlackBerry and on a cell phone.

Figure 1.10. Java can be used to develop applications for hand-held and wireless devices, such as a BlackBerry (left) and a cell phone (right).

 


Introduction to Java Programming-Comprehensive Version
Introduction to Java Programming-Comprehensive Version (6th Edition)
ISBN: B000ONFLUM
EAN: N/A
Year: 2004
Pages: 503

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