From Amazon
Written for the working Java programmer, the
Java 2 Performance and Idiom Guide provides many tips for improving the efficiency (and readability) of your Java code. It provides a useful reference that will benefit any serious Java developer.
The most notable thing about this book is that it provides a real-world perspective on what does and doesn't work for optimizing Java. (The authors' advice is sometimes counterintuitive, and as Java compilers and environments have improved, outguessing the compiler has become a tricky business.) This book is organized into sections based on the likely effect of the suggested optimizations (from "major-moderate" to "minor" improvements). The authors test their code (and provide benchmark numbers) to back up what they say.
Advice on limiting object creation and remote calls, as well as proper class design for custom classes (especially the implementation custom equals() methods and using object factories) are absolutely invaluable here. The authors also look at how to choose the correct Java 2 collection class for your needs. Included in the discussion are several software patterns and "idioms" (language-specific tips), which can lead to more efficient and reusable designs. With a section on naming conventions, this book also promotes good programming style as well as more efficient code.
As a grab bag of hints for writing better code, the Java 2 Performance and Idiom Guide offers something for almost any Java developer. It demonstrates the authors' considerable experience in real-world projects to show some workarounds for problems that you will sometimes encounter when putting Java into the field for the first time, as well as some leading-edge thinking about efficient class design. --Richard Dragan
Topics covered: Java performance and optimization overview; hardware and memory performance hints; Sun HotSpot JVM; server-side performance issues; optimization hints for algorithms, collections, strings, and object creation; patterns; idioms for designing custom classes; dynamic classloading; constructors and object factories; concurrency hints; resource bundling and internationalization tips; exceptions; interfaces; inner classes and constructors; packaging; testing hints (white-box and unit testing); Java naming conventions; and Java coding style.
Book Description
Java best practices- the difference between good code and great code.
The best discussion of Java performance optimization ever published.
Java style standards you can implement throughout your entire development organization.
Detailed coverage of creating Java packages. Its one thing to write Java programs that run. Its another to write elegant Java programs that deliver exceptional performance. For that, you need a profound understanding of Java idioms and style- Thats what Java 2 Performance and Idiom Guide delivers- a complete guide to more than 100 Java best practices youd otherwise have to learn the hard way -- and might never learn! Coverage includes best practices for using the Java language; best practices idioms associated with the key Java libraries; and the patterns and idioms of concurrent programming. The book offers the best coverage of Java performance optimization ever published. Youll learn how to organize Java packages for maximum effectiveness and maintainability; how to test object-oriented Java code; and much more. Larman and Guthrie have bundled a careers worth of Java insight into a single 240-page book -- and every Java developer will benefit from owning a copy.
Craig Larman is an instructor and consultant with Object Space International, and author of the best-selling Applying UML and Patterns. He personally created and delivered the first course in UML, and has over 10 years experience in teaching object-oriented analysis and design. Larman is well-known for his involvement in conferences and seminars such as OOPSLA and Smalltalk Solutions 97.
Rhett Guthrie is a developer and designer at ObjectSpace. He was a key designer of Voyager, one of the firms flagship products. He is now working on the forthcoming Voyager EJB (Enterprise JavaBeans).