Book Review: Agile Java Development with Spring, Hibernate and Eclipse.
Can Java be as Agile as the Dynamics (Ruby, Python, Groovy)?
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.
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.
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.
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.
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.
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
What about security?
Thai Dang Vu
Re: What about security?
Free 45-Day Safari Subscription
Martin Thompson Jul 27, 2014