Moderator (MDR): MDR-andreaw
Guest Speaker (SPK): SPK-name
MDR-andreaw: Hello, I'm Andrea Warren from the JDC. Welcome to the discussion forum. Today we will be talking with Aaron Walsh, the author of IDG's The Java Bible. Feel free to begin sending your questions. Aaron, perhaps you could tell us a little bit about The Java Bible. What is the purpose of the book? Who is your intended audience?
SPK-AaronWalsh: Sure...hello everyone. The Java Bible is intended to be a comprehensive reference for JDKTM 1.0.2 and JDK 1.1 programmers. It starts out by getting folks up to speed on how to program JavaTMin general, then moves into the fundamentals. A large section is dedicated to the AWT (about 8 chapters). Then we have an advanced section that really takes everything covered in the previous 25 chapters (or so) and puts it to good use. Since there's only 1,000 pages (give or take!) of text, we decided to cover 1.1 in print, and then have a separate electronic version of the book on CD-ROM for 1.0.2 readers. The Bible is intended to get programmers fluent with Java, then act as a reference to the core APIs (there are lots of tables).
evansr: Good Morning! I am a webmaster of Medical Central Resource, but very new to Java. What book would you suggest I start with?
SPK-AaronWalsh: Can you tell me a bit more about your experience with Java, and what you want to do?
evansr: I have no experience with Java, but a little with JavaScriptTM. I am interested in developing distance learning medical applications for the Internet.
SPK-AaronWalsh: With that in mind, I'd suggest first getting comfortable with adding Java applets to your web page (if you aren't already, and are intending to take advantage of Java on your web site). Using your experience with JavaScript, try to "hook up" multiple applets in the same page. This will get you into some of the details of Java programming, but not overwhelm you (a good book for basic applet use is Java for Dummies... but then again, I'm a bit biased..;-)) As for distance learning, drop me a line after this chat, and I'll give you some good links. I'm involved in both the medial and education fields, so there are lots of interesting things going on that I can point you towards. As for Java programming, you might check out The Java Tutorial at the JavaSoft site (http://java.sun.com). This is a good way to get started with coding Java, and will help you decide if you really need to plunk down cash for a book.
MattyS: Hello Aaron. I enjoyed your book Foundations of Java and am looking forward to the Bible. I would like you opinion on what you consider the most important feature/features in JDK 1.1 ?
SPK-AaronWalsh: I'm glad you enjoyed FOJ. As for 1.1, JavaBeansTM is, without a doubt, the most important feature as far as I'm concerned. Finally, we've moved into an era where serious software reuse is possible, and components have "come of age." Coupled with the additional network strength of JDK 1.1 (RMI, Serialization, etc.), I think Beans are going to blow the top off the software development industry.
paradigm: I have a question. I was playing with the JDK 1.1 yesterday and using the old 1.0.2 event model. I was surprised that the compiler wasn't issuing any "deprecated" warnings for my older APIs, since I had heard somewhere it would do that. Isn't that what's supposed to happen in that case?
SPK-AaronWalsh: The compiler for the JDK 1.1 should definitely complain that you're using older 1.0.2 code (it likes to nag), so I'm surprised to hear that you're not getting any. The next time you compile, try this first: javac. That will give you a list of all the parameters (switches) that the compiler understands, and will tell you which one to use for full deprecation descriptions. It'll also tell you what the switch is to see what version of the compiler is active, so that's worth testing just to be sure that it's 1.1 (just in case--I have both installed, and sometimes mix the two by mistake). Hope this helps!
MattyS: Do you think that JavaBeans will really have that strong of an influence?
SPK-AaronWalsh: Definitely! (in response to Matty's interest in what I think is the most important JDK 1.1 feature, to which I replied JavaBeans). True component-based computing, which allows full software reuse, has long been a sticking point in our industry. C++ was supposed to help us get there, but in reality too much code is routinely rewritten when it should be reusable as is. JavaBeans really bring us the "black box" model of software development, where your program is comprised of different objects that can be swapped in and out as needed. Basic classes give us that, but don't extend enough into the future where the end user (and this is really key) can participate. Beans can be hooked up visually by the end user--no code required!
JoeSam: Could you describe the kinds of programming tasks that you use for samples? Also, few books cover writing Java programs that work as well as applications or applets. How thoroughly do you cover that area? By the way, I suggest Core Java, other than its lack of JDK 1.1 coverage.
SPK-AaronWalsh: Good question. The first Java programming book I wrote was geared more towards web developers, although application development was also covered (applets were all the rage initially, but the tide is turning). The Java Bible, however, gives equal play to both applets and applications, and really focuses on the fundamentals of the language and core APIs. Applets are covered, of course, but so are applications. In fact, the "real world" examples in Java Bible take a basic applet, and move you through the steps of making it operate as a dual-purpose program (applet and application from one body of source).
jgarner: Core Java is the best intro to Java book that I've seen to date. How does your book compare/differ besides covering the new 1.1 material?
SPK-AaronWalsh: Gary and Cay's book is great, but serves a very different purpose than mine. I'd recommend Core Java to anyone who is already comfortable programming in Java (I own both revisions of Core Java), especially if you don't need help becoming fluent in the language (it's for experienced programmers). The Java Bible, on the other hand, is a combination tutorial/reference. If you're new to Java, or aren't entirely comfortable with all the major features of the language, this will teach you. In that sense, it's a tutorial. As a reference, The Java Bible is more complete than others (including Core Java), since it has tables and charts for the entire base Java APIs, with descriptions of each class/method/variable, as well as a CD-ROM full of source, tools, and resources (like past issues of "Java World"). The CD-ROM also has JDK 1.0.2 coverage of the book, making it ideal for those who need to move back and forth between JDK 1.0.2 and JDK 1.1 world.
MattyS: What's the best strategy for moving between the world of 1.0.2 browsers, and the 1.1 versions (like Netscape Communicator)? I want my applets to be available to everyone, but also want to take advantage of the latest Java features. Your advice?
SPK-AaronWalsh: You're not the only one concerned with the 1.0.2/1.1 shuffle ;-) On the one hand, we have millions of 1.0.2 browsers out there, which means millions of users who can tap into your 1.0.2 applets. But JDK 1.0.2 isn't as rich a language as version 1.1 (the most current version is really 1.1.2, but it's called 1.1 since 1.1.2 is a minor update). So, we have to really decide what we're after. If you want to reach the majority of users, 1.0.2 is clearly the way to go. If you have any degree of control over what browser your users will have (such as in a company or educational environment) you can take advantage of 1.1 without fear that you're cutting users out (simply have them upgrade to 1.1 browsers). Alternately, you can use a few nifty techniques to dynamically switch between 1.0.2 and 1.1 in your code on the fly, which is REALLY nice if you have no control over the browser being used, and plan on using 1.1 code. There are a few ways to do this, perhaps the easiest being try-catch blocks (encase all 1.1 calls in a TRY block, with a lternate 1.0.2 code in the CATCH block). You can also use a little helper applet written in 1.0.2 to "sniff" the browser version being used, and then switch to the appropriate "real" applet (either 1.0.2 or 1.1) as necessary. If you're not comfortable using Java to do that, you can use JavaScript.
Ridge: Is there any reason to directly compose AWT code, or is it better to use a good visual editor to construct an interface with JavaBeans? Also what components can I look forward to with the Swing lightweight components?
SPK-AaronWalsh: What you choose really depends on a lot of factors (comfort level with code, experience with the tool, time pressures, the scope of the project). As a developer, I tend to like coding the stuff myself, since it's more interesting and gives me total control. As someone who runs a software company, however, I could easily argue that hand coding these days is a terrible waste of time, and a top-notch visual development tool is the only way to go (which does all the grunt work, which you can later streamline or alter as necessary). I have to straddle both worlds, so I see the advantages of both sides of the argument. Personally, I like to code. Professionally, I never have extra time, so I rely on visual tools whenever possible to cut deadlines down. As for Swing components, I'm particularly excited to see where they take us. Since they're written in 100% Pure JavaTM, they'll let us take our interfaces cross-platform without compromising on the detailed look and feel that's important to us. That is, I can create a specific-looking component that I KNOW will look exactly the same on all platforms because the underlying peers aren't used.
MDR-andreaw: We're running out of time, so Aaron can only going take a few more quick questions.
Nannette: Hi, I'm a bit late getting here, so this may have come up already. Our University is looking at the VisualAge for Java IDE and EAB for developing database and CICS Beans for using in Java applets. Can you recommend a good place where one could learn more about Java and database connectivity? There really is no tutorial with this beta version and I am really lost coming from a C/Oracle/SQL database background. I have a Java database book, but nothing specifically on using Beans for DBF connectivity.
SPK-AaronWalsh: I worked with client/server database connectivity while running the Advanced Technology Center at Boston College, before starting this company, and think I know exactly the situation you're in. Since we're running low on time, I'll just point you to a few useful sites, and ask that you drop me a line afterwards (aaron@mantiscorp.com) to get more details. First, start at the very beginning (a very good place to start ;-)), and go to JavaSoft's site at http://java.sun.com. From here you can get The Java Tutorial, which is great, and go directly to database links. Then, or at about the same time, check out "Java World" (http://www.javaworld.com) and check out the back issues-- there's lots of database stuff. You can also find a JDBC FAQ at http://www.yoyoweb.com/Javanese/JDBC/FAQ.html, and a good deal of JDBC info at Gamelan (http://www.gamelan.com). Finally, work directly with IBM's VisualAge team. When I was working at BC, they were great. My contacts have since left, or I'd pass them on, but call and see where it gets you (or, better yet, email!). Hope these links help.
maheshd: Could you discuss something about Inner classes, and their uses?
SPK-AaronWalsh: You can always check out http://www.mantiscorp.com/java for links. Inner classes allow you to effectively nest classes inside each other, something which is extremely powerful and useful, but can also be very confusing. Initially, I didn't think much of Inner classes when JavaSoft said they were coming; the seemed to make sense, but didn't seem worth worrying about. Since they've arrived, however, it's clear that Inner classes are extremely useful, but also difficult to master, and so I'm adding a chapter to The Java Bible dedicated to them.
ghimire: I am trying to write a Java code to trigger a C++ application from the intranet using sockets. Are there any books or resources that can tell me how to do it or can you give me some tips that may be helpful? Thanks!
SPK-AaronWalsh: Good question, but it's a bit involved since the chat is closing in a moment, so why don't you drop me a line afterwards at aaron@mantiscorp.com? Sound fair?
JoeSam: Check out www.digitalfocus.com/faq
MDR-andreaw: It's time to close the chat. Thank you everyone who joined, and especially to our guest. If you didn't get your question answered, you can either send email to Aaron at aaron@mantiscorp.com or check the web site for code and links at www.matiscorp.com/java. The Java Bible is scheduled to be in bookstores later this summer, and we'll be posting excerpts on the JDC. Again, thank you everyone.
SPK-AaronWalsh: Thanks for coming folks. Take care.