InfoQ

Article

Book Review: Agile Java Development with Spring, Hibernate and Eclipse.

Posted by Matt Morton on Jun 28, 2006

Community
Java,
Agile
Topics
Dynamic Languages ,
Agile Techniques
Tags
Eclipse ,
Hibernate ,
Groovy ,
Book ,
Spring ,
Python ,
JMX
Book Review: Agile Java Development with Spring, Hibernate and Eclipse. Matt Morton

Abstract:

Can Java be as Agile as the Dynamics (Ruby, Python, Groovy)?

RelatedVendorContent

Agile Development: A Manager's Roadmap for Success

The Agile Project Manager

Unix, Linux Uptime & Reliability Increase While Patch Management Woes Plague Windows (Yankee Group)

Learning to be a Good Product Owner: Foundation Skills

The Agile Checklist

Related Sponsor

VersionOne is recognized by Agile practitioners as the leader in Agile project management tools. Companies such as Adobe, BBC, CNN, Dow, HP, IBM, Sony and 3M have turned to VersionOne to help deliver greater value to their customers.

Agile is a software development trend that many developers are interested in learning, if they aren't already using it. In "Agile Java Development with Spring, Hibernate and Eclipse", Anil Hemrajani attempts to relate Agile practices to Java and several open source toolsets (Spring, Hibernate, Eclipse) designed to make Java development simpler. Essentially, it contains a high level overview of many of the free technologies used in the development of web applications using technologies which are considered "lightweight" in their design but still need to be robust.

Overview

What is Agile?

Essentially "Agile Development" refers to the way code is created using a specific set of ideals as guidelines. These ideals are laid out in the Agile Manifesto. They can be summarized by these four constructs:

  • Individuals and interactions over processes and tools
  • Working software over comprehensive documentation
  • Customer collaboration over contract negotiation
  • Responding to change over following a plan

Agile software development has a broad and deep meaning and encompasses many topics and concepts. Refer to the Agile Alliance for links to further information about Agile principles and practices.

Who is this book for?

Agile Java Development with Spring, Hibernate and Eclipse gives us Anil Hemrajani's own personal take on a agile development method for Java developers. The scope of the book would actually be pretty large if one were to address each of its subjects in detail. It allows for casual reading while at the same time actually providing some of the information needed to develop at the lowest level using Spring, Hibernate, and Eclipse. The primary audience for this text is probably those developers/team leaders who lead and for those who haven't quite jumped into Spring/Hibernate development yet.

Why am I interested?

I have been developing software for a while now and the primary issue that seems to be the ability to transfer a simple yet effective process for developing to other developers. This books title caught my eye because of its attempts to merge the Agile aspects of development which I agree with and enjoy with some of the market disrupting technologies like Spring, Hibernate, and Eclipse. I also teach at the university I work at, and have become a bit disillusioned at times when I try to explain how Java can be used in an agile fashion when compared to many of the dynamic languages out there such as Ruby (or Ruby on Rails) or Python and PHP. The processes around much of the Java development lifecycle are based upon frameworks that were designed 3 or more years ago. The Spring Framework particularly has enabled Java development in a more Agile way. This book intrigued me because its title claimed that it was attempting to showcase Agile practices with many new technologies.

Content Relevance

Having worked with the Spring Framework at various levels for about 2 years now, I found the material on it to be good reminders of why I enjoy using it. Not much is typically written on how to set these products up, with the exception of Eclipse. Most of the setup is left to the reader to figure out. So, if you don't know how to add libraries to your Ant compile task, then you may have trouble actually following some of the examples. But the code download from the publisher was relatively complete so there are good examples in there as well. The section on dependency injection is a good overview for developers who have yet to really investigate what Inversion of Control (IoC) is and the advantages it gives you. IoC is a design pattern where bean relationships are specified by "injecting" the dependencies unto the execution space of the calling object. Refer to Martin Fowlers' site for a more detailed explanation.

Most of the content on the specific frameworks is useful but probably outdated. Spring and Hibernate are both readying major releases and much of the configuration has changed. It is quite difficult, in fact, to stay up-to-the-minute on many of the aspects of these frameworks, as they change rather rapidly. This is the reason the author gives for not including much setup info.

The content that will probably be of the most use to readers is the simple process the author uses to develop the sample application. Starting with the selected practices of XP and AMDD (agile modeling, agile design, agile development) the author begins to construct the domain model for the sample application. He then guides the reader through the the process using CRC cards and User Stories. This was actually quite useful, to see how someone else implements the agile concepts. Many development shops interpret the various aspects of agile differently and so implement them differently. It’s always good to check your process against others. I guess that’s what agile user groups are for.

Years ago, when starting into software development projects, plotting this path was sometimes the most difficult part of the development process. These early chapters will give a much better understanding of at least one useful approach.

Writing on agile methodologies often lacks of discussion of how to really use these technologies with teams. The section on XP lacked a good explanation of what XP encompasses and as a result the reader may be left with the impression that XP only affects the design process and not the coding process as well. Some of the XP concepts were demonstrated in the coding chapters through testing, but XP does have a lot more in it. A note about that might help prevent confusion for developers just starting out with XP.

The chapter on debugging was very useful for getting started with using the Eclipse tools to do web app debugging. I have used debugging in Eclipse for web applications before and still learned some new things. One thing I have noticed is a complete lack of this kind of information in other books. It is good that it was at least was mentioned and shown. Some detailed steps on how to debug the example application would be useful for developers just starting in Java web development.

Chapter 10 contained relevant information on some advanced Ant tasks but the section on Java 5 seemed more like a high-level guidebook. Probably useful for managers if they are looking for an overview, but for developers it isn't sufficiently in-depth and probably doesn't belong there. The advanced section in this chapter on Spring and Hibernate ought to have been included in the chapters on those products. This would allow for a better flow to the book and better indexing of the information. The refactoring section could have easily been made its own chapter. I wouldn’t rely on it for much more than pointers to other information.

One cool thing about the book that I was excited about is the 45 day free access available for the Safari online edition. Too bad it doesn’t work though. I went to the site and followed the instructions and could not get in. The really creepy thing is that you have to enter your personal information and submit it. Hope they aren’t just collecting email addresses.

Readability

Overall the book is quite readable and is presented with a personable style. There are several locations where personal opinions and some comments are listed that appeared to be unnecessary. For example there is a full page aside on UML that seemed a bit misplaced. I think most readers are more interested in how to solve problems than whether a particular tool should be used or not.

Code Examples

One item I didn't like about the example application is the lack of a true Data Access Object (DAO). I have always felt a good set of DAOs is important, to allow turning a portion of an application into an API or library later, with some refactoring. The code was pretty simple, with just the basics being developed, but it did run when executed as a web application. Again the purpose in this case was to show how an Agile approach to a particular business problem could be applied. Many of those who are already experienced in Spring and Hibernate may find it a bit redundant but developers who are new to these frameworks will find them very useful.

Summary

Overall I did like this book and think it is useful to a particular set of developers out there. It was readable despite the asides and the process is pretty sound. It is presented informally rather than in some sort of textbook format, which is a plus in my opinion. Some areas could have been expanded upon, such as refactoring and the advanced Spring and Hibernate pages. It had simple, working code examples to help those new to the topic, and the text was well written overall.

Although useful as a guide for using these Java tools it didn’t answer my questions as to whether Java was as Agile as any of the dynamic languages, but the free toolsets do make it a lot easier and more agile than it has been.

About the Author

When Matt Morton is not busy chasing his four children, he is the Senior Web Architect for the University of Nebraska at Omaha. Besides leading an Agile development team to develop an online ePortfolio solution called myMAPP, he also teaches J2EE development using Agile practices at the undergraduate level. He has been developing professionally for 9 years. You can follow his rants on software and development at his blog on Jroller.

Link to book @ Chapters.ca by Kevin Dougan Posted Jun 30, 2006 3:06 PM
What about security? by Thai Dang Vu Posted Aug 3, 2006 8:25 AM
Re: What about security? by Matt Morton Posted Aug 5, 2006 2:40 PM
Free 45-Day Safari Subscription by Mark Taber Posted Aug 31, 2006 5:21 PM
  1. Back to top

    Link to book @ Chapters.ca

    Jun 30, 2006 3:06 PM by Kevin Dougan

    Here's a link to that book at Chapters.ca:

    www.chapters.indigo.ca/books/item/books-9780672...'0672328968'

  2. Back to top

    What about security?

    Aug 3, 2006 8:25 AM by Thai Dang Vu

    I haven't read this book yet (just skimmed it) and I saw very little about security (e.g. user management, user rights, privileges ...) which exists in AppFuse (google for it if you don't know what it is). For those who read this book already, is security implemented somewhere?

  3. Back to top

    Re: What about security?

    Aug 5, 2006 2:40 PM by Matt Morton

    Good point security would probably be a good topic to include. I think its geared to those just starting. Perhaps someone os working on an Acegi book?

  4. Back to top

    Free 45-Day Safari Subscription

    Aug 31, 2006 5:21 PM by Mark Taber

    The free 45-day subscription to Agile Java Development on Safari is now working. When the reviewer tried it the printed book had just been published but the electronic version was not yet posted on Safari. That has now been remedied and anyone who has bought the print book can access the Safari version online.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.