Spring: A Developer's Notebook

Book description

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 Spring with other open source Java tools such as Tomcat, Struts, and Hibernate
  • master AOP and transactions
  • utilize ORM solutions
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.

Publisher resources

View/Submit Errata

Table of contents

  1. Spring: A Developer's Notebook
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. A Note Regarding Supplemental Files
    3. Foreword
    4. Preface
      1. How to Use This Book
      2. Conventions Used in This Book
      3. Using Code Examples
      4. Comments and Questions
      5. Safari Enabled
      6. Collective Acknowledgments
      7. Acknowledgments from Bruce
      8. Acknowledgments from Justin
    5. 1. Getting Started
      1. 1.1. Building Two Classes with a Dependency
        1. 1.1.1. How do I do that?
        2. 1.1.2. What just happened?
        3. 1.1.3. What about...
      2. 1.2. Using Dependency Injection
        1. 1.2.1. How do I do that?
        2. 1.2.2. What just happened?
        3. 1.2.3. What about...
      3. 1.3. Automating the Example
        1. 1.3.1. How do I do that?
        2. 1.3.2. What just happened?
        3. 1.3.3. What about...
      4. 1.4. Injecting Dependencies with Spring
        1. 1.4.1. How do I do that?
        2. 1.4.2. What just happened?
        3. 1.4.3. What about...
      5. 1.5. Writing a Test
        1. 1.5.1. How do I do that?
        2. 1.5.2. What just happened?
    6. 2. Building a User Interface
      1. 2.1. Setting Up Tomcat
        1. 2.1.1. How do I do that?
        2. 2.1.2. What just happened?
      2. 2.2. Building a View with Web MVC
        1. 2.2.1. How do I do that?
          1. 2.2.1.1. The JSPs
          2. 2.2.1.2. The controllers
          3. 2.2.1.3. The context
        2. 2.2.2. What just happened?
      3. 2.3. Enhancing the Web Application
        1. 2.3.1. How do I do that?
        2. 2.3.2. What just happened?
      4. 2.4. Running a Test
        1. 2.4.1. How do I do that?
        2. 2.4.2. What just happened?
    7. 3. Integrating Other Clients
      1. 3.1. Building a Struts User Interface
        1. 3.1.1. How do I do that?
        2. 3.1.2. What just happened?
      2. 3.2. Using JSF with Spring
        1. 3.2.1. How do I do that?
        2. 3.2.2. What just happened?
      3. 3.3. Integrating JSF with Spring
        1. 3.3.1. How do I do that?
        2. 3.3.2. What just happened?
        3. 3.3.3. What about...
    8. 4. Using JDBC
      1. 4.1. Setting Up the Database and Schema
        1. 4.1.1. How do I do that?
        2. 4.1.2. What just happened?
        3. 4.1.3. What about...
      2. 4.2. Using Spring JDBC Templates
        1. 4.2.1. How do I do that?
        2. 4.2.2. What just happened?
        3. 4.2.3. What about...
      3. 4.3. Refactoring Out Common Code
        1. 4.3.1. How do I do that?
        2. 4.3.2. What just happened?
      4. 4.4. Using Access Objects
        1. 4.4.1. How do I do that?
        2. 4.4.2. What just happened?
        3. 4.4.3. What about...
      5. 4.5. Running a Test with EasyMock
        1. 4.5.1. How do I do that?
        2. 4.5.2. What just happened?
        3. 4.5.3. What about...
    9. 5. OR Persistence
      1. 5.1. Integrating iBATIS
        1. 5.1.1. How do I do that?
        2. 5.1.2. What just happened?
        3. 5.1.3. What about...
      2. 5.2. Using Spring with JDO
        1. 5.2.1. How do I do that?
        2. 5.2.2. What just happened?
      3. 5.3. Using Hibernate with Spring
        1. 5.3.1. How do I do that?
        2. 5.3.2. What just happened?
        3. 5.3.3. What about...
      4. 5.4. Running a Test Case
        1. 5.4.1. How do I do that?
        2. 5.4.2. What just happened?
    10. 6. Services and AOP
      1. 6.1. Building a Service
        1. 6.1.1. How do I do that?
        2. 6.1.2. What just happened?
      2. 6.2. Configuring a Service
        1. 6.2.1. How do I do that?
        2. 6.2.2. What just happened?
      3. 6.3. Using an Autoproxy
        1. 6.3.1. How do I do that?
        2. 6.3.2. What just happened?
      4. 6.4. Advising Exceptions
        1. 6.4.1. How do I do that?
        2. 6.4.2. What just happened?
      5. 6.5. Testing a Service with Mocks
        1. 6.5.1. Why do I care?
        2. 6.5.2. How do I do that?
        3. 6.5.3. What just happened?
      6. 6.6. Testing a Service with Side Effects
        1. 6.6.1. How do I do that?
        2. 6.6.2. What just happened?
    11. 7. Transactions and Security
      1. 7.1. Programmatic Transactions
        1. 7.1.1. How do I do that?
        2. 7.1.2. What just happened?
      2. 7.2. Configuring Simple Transactions
        1. 7.2.1. What just happened?
        2. 7.2.2. What about...
      3. 7.3. Transactions on Multiple Databases
        1. 7.3.1. How do I do that?
        2. 7.3.2. What just happened?
      4. 7.4. Securing Application Servlets
        1. 7.4.1. Why do I care?
        2. 7.4.2. How do I do that?
        3. 7.4.3. What just happened?
      5. 7.5. Securing Application Methods
        1. 7.5.1. How do I do that?
        2. 7.5.2. What just happened?
        3. 7.5.3. What about...
      6. 7.6. Building a Test-Friendly Interceptor
        1. 7.6.1. How do I do that?
        2. 7.6.2. What just happened?
    12. 8. Messaging and Remoting
      1. 8.1. Sending Email Messages
        1. 8.1.1. How do I do that?
        2. 8.1.2. What just happened?
      2. 8.2. Remoting
        1. 8.2.1. How do I do that?
        2. 8.2.2. What just happened?
        3. 8.2.3. What about...
      3. 8.3. Working with JMS
        1. 8.3.1. How do I do that?
        2. 8.3.2. What just happened?
      4. 8.4. Testing JMS Applications
        1. 8.4.1. How do I do that?
        2. 8.4.2. What just happened?
    13. 9. Building Rich Clients
      1. 9.1. Getting Started
        1. 9.1.1. How do I do that?
        2. 9.1.2. What just happened?
      2. 9.2. Building the Application Shell
        1. 9.2.1. High-level application goals
        2. 9.2.2. How do I do that?
          1. 9.2.2.1. Check point
        3. 9.2.3. What just happened?
      3. 9.3. Building the Bike Navigator View
        1. 9.3.1. How do I do that?
        2. 9.3.2. What just happened?
      4. 9.4. Building the Bike Editor Forms
        1. 9.4.1. How do I do that?
          1. 9.4.1.1. Validation
        2. 9.4.2. What just happened?
        3. 9.4.3. What about...
    14. Index
    15. About the Authors
    16. Colophon
    17. SPECIAL OFFER: Upgrade this ebook with O’Reilly

Product information

  • Title: Spring: A Developer's Notebook
  • Author(s): Bruce Tate, Justin Gehtland
  • Release date: April 2005
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596553098