In their book Better, Faster, Lighter Java, Bruce A. Tate and Justin Gehtland argue against heavyweight architectures and approaches like J2EE, EJB, and CORBA. This book is aimed at advanced Java programmers who feel that the “industry standards” for Enterprise Java are inflexible and too complicated. Bruce A. Tate and Justin Gehtland present in 11 chapters and 242 pages more “lightweight” and non-invasive frameworks like Hibernate and Spring as an alternative.
The book is organized into two main parts. The first part (chapter one to six) examines existing enterprise solutions like J2EE and EJB and shows why they often do more harm then they help to develop better applications. Further five principles for fighting the “bloat” are presented. The second part (chapter seven to eleven) shows how to apply those principles and presents existing frameworks like Hibernate and Spring that adhere to those principles.
Chapter 1 introduces the “bloat” and develops the principles:
- Keep it simple
- Do one thing, and do it well
- Strive for transparency
- Allow for extension
- You are what you eat
Then chapter 2 to 6 cover each principle in detail and show where existing Java enterprise solutions violate these rules. The resulting hindrances for development, extension, and change are examined. Further agile techniques and principles like Unit Testing, louse coupling and Inversion of Control are introduced. Many problems are supported by code examples and are quite convincing.
Not only the bad examples are given, also more “lightweight” frameworks and approaches are described in each chapter and more agile solutions to the problems that the “heavyweight” methods are attacking are presented. A nice side effect is that by reading this you will get a good overview of existing approaches and solutions.
After introducing general “lightweight” methods, the second part of the book examines two frameworks in detail and uses these to build an example application.
Bruce A. Tate and Justin Gehtland start by introducing Hibernate, an OpenSource object/relational persistence and query service for Java. With Hibernate your Java objects gets persistence just through configuration, without adding code. Chapter 8 will then introduce Spring, a lightweight container for EJBs that includes an abstraction layer for transactions, JDBC, persistence (through Hibernate, JDO, or iBATIS), AOP functionality, and a MVC web framework.
Chapter 9 and 10 will show you how to use Spring and Hibernate by developing example applications and are successful in given an overview of Spring’s capabilities. The book ends with chapter 11 and an outlook challenges and interesting techniques.
My impression is that the book is really helpful in order to convince you of the advantages of “lightweight” approaches and to learn the drawbacks of common technologies. If you already know that EJB 2 is horrible, don’t worry, you won’t be bored as enough alternatives are presented. Especially the second part of the book gives a good overview on the most popular alternative, Spring in combination with Hibernate.
Apart from the technology centered view, Bruce A. Tate and Justin Gehtland teach general principles that apply to every software development process.

