Learning any high-end language is difficult. However, some developers have complained that Java is one of the harder languages to learn because it lacks tools that other high-end languages provide. Sun is apparently aware of the complaints because it's promised to provide better tools (see the article at http://www.infoworld.com/article/03/06/09/23NNjavaone_1.html for details). Ease of use issues aside, Java is still a very powerful and flexible language, so you should honestly consider this solution for your next Google Web Services application. A single chapter can't show you everything about Java, so this section provides some resources where you can learn more.
Tip | The court of public opinion on whether .NET or Java is the best solution to use for Web services is about split. According to a survey late in 2002 (see http://www.infoworld.com/article/02/10/09/021009hndevsurvey_1.html?1010thap for details), developers are spending equal time on both technologies. In short, both technologies are popular ”you need to decide which one meets your needs best. |
One of the best places to learn about Java is the Sun Web site at http://java.sun.com/docs/books/tutorial/. This site provides a good overview of Java and some great introductory material you can use to learn the language. For example, this tutorial explains the difference between a stand-alone application and an applet. Note that this Web site does provide separate instructions for Windows, Linux/Unix, and Macintosh developers. You might find it helpful to read the instructions for your platform of interest, and then quickly glance through the other two sections to pick up platform-specific issues.
If you need another basic tutorial, then look at "Brewing Java: A Tutorial" at http://www. ibiblio .org/javafaq/javatutorial.html. The author of this tutorial actually expanded it into a book that he also mentions on the site. If you find the whole concept of object-oriented programming with Java difficult to understand, you'll want to view the "Don't Fear the OOP" tutorial at http://sepwww. stanford .edu/sep/josman/oop/oop1.htm.
Choosing a Java Editor | The Sun tutorial suggests using Windows Notepad or a similar text editor, such as Notepad+ (http://www.mypeecee.org/rogsoft/), for creating your Java applet code. However, you should consider using a good Java editor to make the development experience a lot better. The Sun ONE Studio 4, Community Edition IDE mentioned in the tutorial isn't available for download any longer ”Sun has replaced it with a 60-day demonstration version of Sun ONE Studio 5, Standard Edition. You can get the Sun ONE Studio 5, Standard Edition IDE at http://wwws.sun.com/software/sundev/. The advantage of using the official IDE is that Sun designed it for Java and the IDE provides Java-specific help. In some cases, a third party product such as SlickEdit (http://www.slickedit.com/) is actually a better deal. The SlickEdit solution provides support for multiple languages, which means you only have to learn one editor. Although this is a shrink-wrapped application, you can obtain a limited use trial version from the company Web site. You might also consider using a product such as jEdit (http://www.jedit.org/) because the same executable runs on Macintosh OS X, OS/2, Unix, VMS, and Windows. The author wrote this editor in Java and it points out the platform independence this language provides in a real world application. You'll find that jEdit has great community support, so you can download any of a number of add-on products for it. I used the jEdit editor to write the GoogleSearch and SimpleApplication examples in this chapter and found the color coding it provides extremely helpful. You can download this open source product free. Another great IDE is JCreator (http://www.jcreator.com/). You can get the freeware version of the product and use it as long as you like. The professional version of the product is shareware, so you can download and use it free for 30 days. I also tried this editor while working on the DatabaseStore and SimpleApplication examples for this chapter. (The JCreator version of the SimpleApplication example appears on the Sybex Web site.) It's a great choice for developers who have worked with VBA or Visual Studio and are familiar with the IDE for those products. This is also one of the better editors for large projects because it helps you organize your project better and includes features such as a debugger. |
An excellent beginner tutorial is Phil Heller's Ground-Up Java (Sybex, 2004). Ground-Up Java assumes no programming experience, but gets the reader up and running as a Java programmer quickly. The unique aspect of this book is the collection of powerful animated illustrations on the accompanying CD-ROM. They provide a crash-free environment to experiment with Java programming. The animated illustrations combined with the graded exercises that conclude every chapter and Phil Heller's clear explanations of concepts and techniques make Ground-Up Java a programming course and computer lab rolled into one.
Once you learn a little about Java, try some of the more advanced developer tutorials offered by Sun at http://developer.java.sun.com/developer/onlineTraining/. The tutorials on this site are diverse and some are complex, so make sure you understand the requirements for using the tutorial before you get too involved (the requirements normally appear as part of the tutorial's introduction). The feature I like most about this site is that all of the tutorials have dates, so you know how old the information is before you get started.
A number of third parties also provide advanced tutorials and this section doesn't even begin to list them all. One of the more interesting offerings is the Advanced Java/J2EE Tutorial at http://my.execpc.com/~gopalan/java/java_tutorial.html. This tutorial begins with a comparison of the various communication technologies (including Java/RMI, DCOM, and CORBA). You might also want to look at Java Coffee Break at http://www.javacoffeebreak.com/ because it includes a wide range of tutorials (some advanced) as well as other resources.
Newsgroups can also provide essential information to the Java developer. One of the best newsgroups to try is comp.lang.java. Note that this newsgroup has numerous subfolders you'll also want to visit. For example, you can keep track of Java bugs on the comp.lang.java.bugs newsgroup. The comp.lang.java newsgroup enjoys broad support and some people even support it on their Web sites. For example, check out the comp.lang.java FAQ List at http://www.ibiblio.org/javafaq/javafaq.html. You can also try newsgroups such as alt.comp.lang.java. Make sure you check any vendor specific Java newsgroups groups such as borland.public.jbuilder.java when you use a particular product.