1.1 How Does a Best Practice Come About?

I l @ ve RuBoard

Slowly, and with experience. But let's take a step back first and look at how anyone becomes an expert in a specific environment. A programmer goes through four steps when learning to program with any modern language, including Java: [1]

[1] Guy Steele uses a humorous analogy of real-world languages at the beginning of Effective Java (Addison-Wesley) to demonstrate this, although he boils it down to three points. I tend to stress environment to my authors much more heavily, as that often decides whether a practice is good or bad (e.g., massive lookup tables don't work well on cell phones). These four points also fall more in line with the types of books were generate at O'Reilly.

  1. You learn the syntax of the language, usually through a tutorial of some sort . In the case of Java, you quickly learned, for example, that, unlike with C++, there was no "delete" keyword for memory deallocation. The garbage collector took care of that automatically. You also learned that the Java language designers included a "synchronized" keyword to help you avoid common threading issues.

  2. You learn the environment that you're programming toward. Is it on a 2 GHz PC, or an embedded controller with limited memory on a cell phone? Are you targeting a PDA with access to a business network? Are you compiling toward a supercomputer Internet server that must handle millions of connections per day? Perhaps it's only one of the above. Perhaps all.

  3. You learn how to use one or more specialized libraries and APIs with the language. Often, this involves a more direct tutorial or reference book. For example, a good many of you learned how to use the servlet API by reading one of our books, Java Servlet Programming . Or perhaps you learned from some other book, [2] or even from an article on the Internet.

    [2] Shame on you. :-)

  4. You slowly begin to gain experience, gleaning tips and tricks for using both the language and the APIs in the defined environment. More precisely, you learn ”from your own or others' mistakes ”that there are things you should always do, things you should consider doing only under specific circumstances, and things you should never do, even if the documentation says it's OK.

As we hinted earlier, the exclusive province of this book is the fourth area, and it pinpoints the J2EE APIs. This book compresses advice from nearly all of O'Reilly's Java Enterprise authors, each of whom has gained a wealth of experience, not only while writing his book, but also while interacting with programmers like you since their publication. Some of these tips will surprise you; some you might have already learned yourself. But we think you'll agree that all are valuable .

Now, having said that, we can tell you what this book is not. This book is not a tutorial or a reference on using the specific APIs, as you might find in the third point. We expect that as you peruse these chapters, you are at least modestly familiar with the APIs in question, and have some programming experience with them. However, if you need a quick refresher on any of the APIs in question, we recommend any of the following books from O'Reilly's Java catalog:

Ant: The Definitive Guide
Building Java Enterprise Applications Volume I: Architecture
Database Programming with JDBC and Java , Second Edition
Enterprise JavaBeans , Third Edition
Java and SOAP
Java and XML , Second Edition
Java and XML Data Binding
Java and XSLT
Java Distributed Computing
Java Enterprise in a Nutshell , Second Edition
Java Internationalization
Java Management Extensions
Java Message Service
Java Performance Tuning
Java Programming with Oracle JDBC
Java Programming with Oracle SQLJ
Java RMI
Java ServerPages , Second Edition
Java Servlet Programming , Second Edition
Java Web Services
JXTA in a Nutshell

If you're really in a hurry, we highly recommend Java Enterprise in a Nutshell , Second Edition. This book provides an excellent balance of tutorial and reference that can help any aspiring Java Enterprise programmer come up to speed in no time.

I l @ ve RuBoard


The OReilly Java Authors - JavaT Enterprise Best Practices
The OReilly Java Authors - JavaT Enterprise Best Practices
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 96

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