Synopses & Reviews
Since development first began on Spring in 2003, there's been a constant buzz about it in Java development publications and corporate IT departments. The reason is clear: Spring is a lightweight Java framework in a world of complex heavyweight architectures that take forever to implement. Spring is like a breath of fresh air to overworked developers. In Spring, you can make an object secure, remote, or transactional, with a couple of lines of configuration instead of embedded code. The resulting application is simple and clean. In Spring, you can work less and go home early, because you can strip away a whole lot of the redundant code that you tend to see in most J2EE applications. You won't be nearly as burdened with meaningless detail. In Spring, you can change your mind without the consequences bleeding through your entire application. You'll adapt much more quickly than you ever could before. Spring: A Developer's Notebook
offers a quick dive into the new Spring framework, designed to let you get hands-on as quickly as you like. If you don't want to bother with a lot of theory, this book is definitely for you. You'll work through one example after another. Along the way, you'll discover the energy and promise of the Spring framework. This practical guide features ten code-intensive labs that'll rapidly get you up to speed. You'll learn how to do the following, and more:
- Install the Spring Framework & set up the development environment
- Use the Inversion of Control pattern to simplify wiring together your classes
- Use Aspects to add services like transactions and security without pain
- Use tools like Hibernate and iBatis
- Use Spring MVC and Spring Rich to build web frontends and rich clients
- Use Spring with frameworks such as Struts and JSF
As with all titles in the Developer's Notebook series, this no-nonsense book skips all the boring prose and cuts right to the chase. It's an approach that forces you to get your hands dirty by working through one instructional example after another-examples that speak to you instead of at you.
An all code and nothing but the code introduction to the new Spring Framework
About the Author
Bruce A. Tate and Justin Gehtland are the authors of Better, Faster, Lighter Java, which won a JOLT award in 2005. This book continues their investigation of "lightweight" technologies.
Table of Contents
Foreword; Preface; How to Use This Book; Conventions Used in This Book; Using Code Examples; Comments and Questions; Safari Enabled; Collective Acknowledgments; Acknowledgments from Bruce; Acknowledgments from Justin; Chapter 1: Getting Started; 1.1 Building Two Classes with a Dependency; 1.2 Using Dependency Injection; 1.3 Automating the Example; 1.4 Injecting Dependencies with Spring; 1.5 Writing a Test; Chapter 2: Building a User Interface; 2.1 Setting Up Tomcat; 2.2 Building a View with Web MVC; 2.3 Enhancing the Web Application; 2.4 Running a Test; Chapter 3: Integrating Other Clients; 3.1 Building a Struts User Interface; 3.2 Using JSF with Spring; 3.3 Integrating JSF with Spring; Chapter 4: Using JDBC; 4.1 Setting Up the Database and Schema; 4.2 Using Spring JDBC Templates; 4.3 Refactoring Out Common Code; 4.4 Using Access Objects; 4.5 Running a Test with EasyMock; Chapter 5: OR Persistence; 5.1 Integrating iBATIS; 5.2 Using Spring with JDO; 5.3 Using Hibernate with Spring; 5.4 Running a Test Case; Chapter 6: Services and AOP; 6.1 Building a Service; 6.2 Configuring a Service; 6.3 Using an Autoproxy; 6.4 Advising Exceptions; 6.5 Testing a Service with Mocks; 6.6 Testing a Service with Side Effects; Chapter 7: Transactions and Security; 7.1 Programmatic Transactions; 7.2 Configuring Simple Transactions; 7.3 Transactions on Multiple Databases; 7.4 Securing Application Servlets; 7.5 Securing Application Methods; 7.6 Building a Test-Friendly Interceptor; Chapter 8: Messaging and Remoting; 8.1 Sending Email Messages; 8.2 Remoting; 8.3 Working with JMS; 8.4 Testing JMS Applications; Chapter 9: Building Rich Clients; 9.1 Getting Started; 9.2 Building the Application Shell; 9.3 Building the Bike Navigator View; 9.4 Building the Bike Editor Forms; Colophon;