Spring A Developer’s Notebook

Spring A Developer's Notebook

Spring A Developer’s Notebook

I am preparing for a Spring/Dependency Injection Lunch and Learn and I found an old Spring book that I re-read to see if it had any good nuggets of information.  Spring A Developer’s Notebook by Bruce Tate and Justin Gehtland is very concise, give you the basics type of book.  The book was published in April 2005, so it is quite dated.  I remember reading this when it came out.  I was working at IFMC and we were looking to use Spring.  I actually saw Bruce Tate speak at a No Fluff Just Stuff in Minneapolis probably ten years ago.  He is an entertaining speaker.  He shared lots of good stories as he does in this book.  He starts every chapter with stories of his outdoor activities.  It adds a little personality to the normal boring software book.

The book starts talking about what the reasons for the rise of the Spring framework.  Enterprise Java Beans(EJB) were being pushed as the way to do Java development.  Bruce outlines the issues with EJBS:
  • Difficult to test EJBs
  • EJBs are incredible intrustive
  • EJBs force unnatural design decisions
  • No support for inheritance
He then moves on to detail in Spring how with a few lines of XML configuration you can make your code secure, remote or transactional quickly.

In chapter one they begin by building two classes with a dependency to illustrate what dependency injection can fix the coupling issues.  The hardwired solution is cumbersome to update.  The details of the dependency injection pattern revealed along with the value it brings.  The central part is an assembler or container that loosely couples the two dependent classes.  First they wrap the service with an interface.  Then add a client to refer to the service and then using the framework build the service and populate the property.
The book then moves onto detail how to inject dependencies with Spring.  They start with JDBC and couple that to the sample application and then move on to using Object Relational Mapping ORM tools.  They also cover services, transactional development, messaging and remoting.
No comments yet.

Leave a Reply

Powered by WordPress. Designed by Woo Themes