Log in ....Tribune


Dot.ComLatest in ITFree DownloadsOn hardware

Monday, November 5, 2001
IT Bookshelf

'Bible' that teaches Java applets
Java 2 Programming Bible

By Walsh, Couch and Steinberg. Page 905, Price Rs 399

"JAVATM 2 Bible", a book designed to teach programmers how to develop dynamic, distributed Web content and desktop applications using Java. Although experience with C or C++ is helpful, it it's not required; this book teaches you how to create and deploy dynamic software products using the most exciting programming language ever, that is Java. There is a Website especially for the Java 2 Bible readers - www.javabible.com to get source code listings found in this book, cutting edge development tools and much more.

The Java language is designed to create executable content, such as applets, applications, and handlers. In fact Sun's Hot Java Web Browser, the world's first Java-savvy browser, is an application written entirely in the Java language. Java is a cross-platform technology; this book attempts to give equal play to both platforms.

The first section of the "Java 2 Bible" introduces Java 2 platform covering basic components of Java language architecture including features like object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, multithreaded, dynamic, and capability of high performance. It also covers the runtime environment that is a combination of a Virtual Machine specification and an extensive collection of pervade libraries (API) that together can run the Java programs. There is also an introduction to a few of the tools that comprise Sun's Java development Toolkit (SDK) - the tools you use to create your own Java programs.

 


Section II introduces the brass tacks of Java programming language. Beginning with the basic concepts of tokens, types and values, this part covers defining and using variables, controlling program execution, creating own classes, and handling exceptions. Several fundamental Java 2 packages and classes- including strings and arrays are reviewed in detail as well. In addition, you learn how to create reusable and robust Java programs by taking advantage of key object-oriented programming techniques such as inheritance, composition, aggregation, encapsulation, abstraction and polymorphism. You will learn how to direct the flow of program execution, as Java supports several control-flow statements. Control-flow statements give more of the puzzle pieces you need to start building your own Java applications. With that knowledge you could be well on your way to creating simple applications using Java.

The third section covers Java 2's most important core class libraries, including collections, utilities, and data structures. It also explains how to handle input and output that is followed by a detailed and through discussion of multithreaded programming with Java 2. Threads are quick and easy to add to programs, but with such power comes the responsibility of clearly defining which tasks deserve their own threads. This part includes key points like using the collections class, creating own custom comparators for controlling how to look and sort through your data, creating and accessing information from various types of data structures in the java.util package. Java takes the flexibility of the Internet and makes it easy. This part makes you understand how to add networking support to your own applications. Finally, this part teaches how to tap into Java's powerful network capabilities, after which you will learn how to integrate Java with databases by way of Java Database Connectivity (JDBC) Application programming interface and how to connect to databases and perform queries and updates.

Section IV tells how to create functional user interfaces with Abstract Windowing Toolkit (AWT), Java Foundation Classes (JFC), and Swing GUI facilities. This part shows how to add graphics, fonts, windows and user-interface controls- such as buttons, list boxes, text fields, combo boxes, menus and sliders - to your own Java applications. This part makes you learn about layout managers and usage as well as description of five major layout manager implementations. The highlights of this part are loading and drawing images to the screen from external files, drawing text to the screen while controlling attributes like font information, drawing simple primitives to the screen such as lines, circles, and filled areas, being able to provide simple printing capabilities for your applications. Finally, this section shows you to trap and respond to events like mouse clicks, mouse movements and keyboard activity.

The fifth section teaches you to deploy the applets and applications for the world to see. It introduces the reader to the extremely useful JAR file along with creating and managing JAR files using command-live tools. This part covers the areas like adding JAR files to the environment so they may be used in applets or applications, creating and managing JAR files using command-line tools, using the java.util.jar package and seeing what it allows to do within an application and customising the behaviour of JAR files.

To develop applets and applications in Java, you must first install Sun's Java Software Development Kit (SDK) on the computer. Appendix A of JavaTM Bible introduces you to a few tools for installing and configuring the Java SDK. In any professional programming environment, documenting your code is one of the most important aspects of the job. Realizing this as the standard problem, Sun set out to encourage good documentation practice by including a tool that automatically generates documentation from your code. This tool is called Javadoc. Appendix B traces how to use Javadoc documentation facility. The Internet contains a huge variety of sources for creating and using Java applications. Appendix C discusses about surfing the source code. Java extensions are a standardised set of interfaces to some functionality that does not belong in the core API set but has been through Sun's standardisation process. The Appendix D covers the details about extensions to the core. And lastly, Appendix E discusses about the future of Java.

To conclude, Java2 platform, JavaTM Bible is packed with information necessary to refine your programming skills.

—Amit Bakshi

Home
Top