Monthly Archives: June 2013

Spring Data – by Mark Pollack et al


TLDR:  If you are working with Spring Data on a daily basis and want a complete and thorough overview of the framework then this book is all you will need. It covers all aspects of Spring Data without being overly verbose, and even if you have used Spring Data quite a lot already (like me), then I still believe you’ll discover something useful from this book. You will also find bonus chapters in context with Spring Data on Spring Roo, the REST repo exporter (very cool!), ‘Big Data’ via Hadoop, Pig, Hive and Spring Batch/Integration, and also coverage of GemFire.

I’ve been working professionally with Spring Data for quite some time now, both for ‘old skool’ RDBMS and also a lot of NoSQL (primarily MongoDB and Redis). The company I was working for at the time the Spring Data projects were approaching release were somewhat early-adopters, and in combination with the fact that their applications were firmly rooted in Spring made the decision to use this framework an easy choice. After some initial problems, which should be expected with a new technology (such as config issues and incompatibly between libraries bundled in JARs etc), Spring Data has provided a massive boost to productivity, and it is now my de facto choice when implementing persistence within Spring.

About the book itself: The first few chapters provide a great introduction to Spring Data, and describe the key motivations and techniques behind the framework. If you are simply modifying an already configured Spring Data app then this is all you need (but please do keep reading to learn more!). The next few chapters cover integration with an RDBMS, and also the popular NoSQL implementations – MongoDB, Neo4j and Redis. If you are working in one specific technology then reading the corresponding chapter will get you up and running quickly. Although Spring Data provides a common abstraction layer, it allows datastore-specific functionality to bleed through the interfaces (which is a good thing in my opinion, as it allows you to leverage specific features and strengths of the underlying technology), and this book will provide an excellent grounding and explanation of key concepts within each underlying datastore technology so that you can become productive quickly. Of course, you can also head over to the Spring Source website to learn the really advanced stuff (if you want to).

Part 4 of the book covers several interesting advanced features of the framework, such as using Spring Roo to auto-generate repository code, and also a brief guide on how to use the REST Repository Exporter. Metaprogamming and RAD tools like Spring Roo (and web-frameworks such as Grails and Play) are becoming increasingly popular in the industry, and so this chapter is a nice addition to the book. The REST exporter is also a very cool feature, and essentially allows you to expose CRUD functionality on your repositories via a REST interface. For anyone building a SOA-based app (or using micro-services etc) then encapsulating datastores and exposing simply functionality via a well defined HTTP-based API is very cool.

The final two parts of the book provide detailed coverage of using Spring Data to work with ‘Big Data’ through the use of Apache Hadoop, Spring Batch, Spring Integration and GemFire. Although this content wasn’t relevant to my initial decision to buy the book the chapters are a complete bonus in my opinion, and upon reading them I was even more happy with my purchase. The content provided is obviously quite high-level (as Big Data is a huge topic, no pun intended :)), but has enough detail to get you up and running with some Hadoop Jobs and Hive and Pig etc, which is a great skill to add to your CV.

I chose this book over the only other real competition for Spring Data coverage, Petri Kainulainen’s Spring Data, purely because this book offered more content. Obviously the book under review has more pages, ~280 vs ~160, but more importantly it covers a greater amount of topics, and Petri’s book focuses primarily on Redis (for which I was already familiar with). My main motivation for buying a Spring Data book was to learn about the ‘tips and tricks’, and I think either book would have met this need, but the coverage of other NoSQL technologies in the book under review, and the bonus chapters on Big Data technologies swayed my final decision. Now that I’ve read the book I am very happy with the decision.

In summary: This book will be all you need to master Spring Data, from key concepts to advanced usage. You’ll learn all of the ‘tips and tricks’ along the way, and also become familiar with Spring Roo, the REST repo exporter and fundamental techniques within Spring Data’s ‘Big Data’ processing (Hadoop, Spring Batch/Integration etc). I would recommend the book to any Spring developer, even one like myself who is happy learning about Spring from the excellent Spring Source website This book is a little more ‘polished’ than the Spring Source docs, and also provides concepts in well-structured and bit-sized chunks of information.

Click Here to buy ‘Spring Data‘ on Amazon (This is a sponsored link. Please click through and help a fellow developer to buy some more books!  )

Spring in Practice – by Willie Wheeler and Joshua White


TLDR; This is an excellent and comprehensive guide to advanced usage of the Spring framework. For anyone who is looking to further their knowledge gained from several years of Spring development in the trenches, this book will pay dividends. Although a Spring novice may be able to learn about Spring from this book, I would recommend picking up a copy of Spring in Action first, as the ‘In practice’ books can be quite fast paced!

As a seasoned Java developer I have been working with the Spring framework for many years now. One of the first Spring books I read was Spring in Action, and in combination with Java Persistence with Hibernate  this book has helped me complete many successful projects (I seriously owe the authors a few beers!). From the grounding provided in these book, and in combination with the excellent Spring Source website, I have been able to explore and develop my skills as the Spring framework has expanded – for example, the Spring Data project is now my go-to framework for all things NoSQL related. However, I always enjoy learning from advanced Spring practitioners and also from reading stories about real-world use and abuse of the framework, and I have yet to find a good book that meets this need – until now. ‘Spring in Practice’ satisfies this gap in the market perfectly.

The book is ~500 pages, and it manages to cram in a lot of content. Advanced usage of all the main Spring components is covered, and covered well. The first nine chapters provide a great grounding and advanced look at topics such as data persistence (ORM), Spring MVC, Web Flow and Security. The remaining chapters deep-dive into topics such as Integration Testing and Enterprise Integration (REST, RabbitMQ and IMAP integration etc), and really focus on how to write good (high-quality) code for the common but difficult tasks.

As the title suggests, the book’s focus is very much about practical usage of Spring. It’s not quite in the ‘cookbook’ style you may have seen with other books, but IMHO, this book is better organised for general learning (i.e. reading the book from cover to cover). The obvious advantage with a cookbook style reference is that it’s easy to cherry-pick solutions to problems, but I find that cookbooks can be difficult to read through if you simply want to learn. ‘Spring in Practice’ is logically structured, the book is nicely paced for the advanced developer, and the discussions of real-world problems and the related code sample solutions seek to further your knowledge and encourage exploration of Spring.

As mentioned above, I have worked with Spring for several years, but this book has taught me lot of new tricks – there’s nothing like finding a section of the book that leads to a ‘no way, Spring does that?’ moment 🙂 The author’s clearly have their own style of developing in Spring, and I personally would chose to do some things differently (e.g. I code the production of XML/JSON differently), but I can’t argue that what they’ve done isn’t best practice, and with a framework as large and wide-scoped as Spring, there is bound to be many approaches to do the same thing.

In summary, this is an excellent book, and one that should be on the bookshelf of any serious Spring developer. It will help deepen knowledge gained from ‘Spring in Action’, and also help to augment skills honed from time in the development trenches. I can almost guarantee that anyone who picks up a copy of this book, no matter how advanced they are, will learn something new. As you’ve no doubt guessed by now, I highly recommend this book, and I would like to offer my congratulations to the authors and Manning for writing a book which has long been needed by advanced Spring practitioners!

Click Here to buy ‘Java Persistence with Hibernate‘ on Amazon (This is a sponsored link. Please click through and help a fellow developer to buy some more books!  )

Java Application Architecture: Modularity Patterns with Examples Using OSGi: A Roadmap for Enterprise Development (Agile Software Development) – by Kirk Knoernschild


TLDR: This book is a thought-provoking peek into a topic that I believe will be highly influential in the next stage of evolution within software craftsmanship. The concepts presented within this book sit nicely in between the low-level ‘clean code’ philosophy (SOLID principles, Design Patterns, TDD etc) and the high level system/platform architecture principles (loose coupling, message orientation, event-driven systems, EIP etc). If you are serious about becoming a well-rounded developer or architect then this book is a must read.

I’m a freelance software architect/developer who primarily works on the JVM stack. I’m a strong supporter of Uncle Bob’s ‘Clean Code’ principles, and I spend a lot of time on InfoQ and various other sites learning about historical and current big-picture systems architectural approaches, but until reading this book I hadn’t thought too much about what happens in the middle of all of this. As a seasoned developer I now have several formuli for designing the big-picture architecture, and am happy creating (what I think is) well crafted code. But in the Java world packaging components together for deployment can feel clumsy at times (fat JARs or stuffed WARs anyone?). This book aims to address this discomfort.

The key premise of the book is ‘Architecture all the way down’, and although this may not make sense to you now, I have a strong suspicion that after reading the book and watching the online videos of the author (at Parleys) you’ll be nodding along enthusiastically (or at least thinking that more attention should be focused in this space). Several of the principles within this book are discussed within the context of OSGi, and although I’ve been aware of OSGi for quite a while now, it always seemed peripheral to what I was working on, and chatting with colleagues used to produce the ‘isn’t that the huge frameworks used to develop app servers?’ type conversations. Although the book doesn’t deep-dive into OSGi per se, it did help to clear up a lot of the mystery and intended design goals for me.

Just to address a few comments made by other reviewers on

* I also believe that this book will be suitable for a non Java developer/architect, although the reader may have to work a bit harder to relate the content to analogous frameworks and toolkit within their chosen language/platform.
* In regards to the review stating ‘not a general software architecture book’ I respectfully think the reviewer has missed the point of this book – ‘Java Application Architecture’ is clearly aimed at a well-defined and often over-looked niche within the software architecture domain, and should not be considered in isolation. It would be easy to say that a book on software design patterns is ‘not a good software development book’, but this is because the application of design patterns should be mixed with well-crafted code and other good design principles.

In summary, if you’re a fan of reading books like Uncle Bob’s inspiring Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin) and the ground-breaking The Pragmatic Programmer you are going to enjoy this a lot. It may not leave you with concrete implementation details, but it will make you think a lot about how you assemble your software components.

Bonus: Check out Kirk’s Devoxx talk on Parleys: Architecture All The Way Down.

Click Here to buy ‘Java Application Architecture: Modularity Patterns with Examples Using OSGi: A Roadmap for Enterprise Development (Agile Software Development)‘ on Amazon (This is a sponsored link. Please click through and help a fellow developer to buy some more books! ).

Extreme Programming Pocket Guide – by Chromatic


TLDR: If you’re looking for a concise guide to the philosophy and practices within the Extreme Programming (XP) movement then this is the book for you. Yes, the book was published nearly 10 years ago (which is practically a lifetime in the world of computing), but fundamental methodologies such as those documented within this book really don’t go out of date.

Even though I have worked within the software development industry for a decade I have never actually read a focused overview of what Extreme Programming is. Sure, I’ve read lots of blogs and chatted at great length to my peers about the subject, but after several heated discussions at a local Java User Group I realised it was about time I read up on the subject properly.

My goal was to learn in as short a time as possible about how the processes we all associate with the XP movement fit together, and I believe this book met that objective perfectly. There are plenty of bite-sized and quotable words of wisdom on topics such as the core XP Values, Coding Practices (TDD, pairing etc), XP events, development artifacts and XP Roles. I personally found it very helpful in clarifying my thoughts on the XP process as a whole – many of the XP practices are now common place within our industry, but often they are used in isolation or not as originally intended, and this book is a great reminder/primer on how the XP movement is not just a series of good practices, but a general philosophy for producing well-crafted software applications.

In summary, this is a very useful book for exploring XP practices and also understanding the philosophy behind the movement.

Click Here to buy Extreme Programming Pocket Guide on Amazon (This is a sponsored link. Please click through and help a fellow developer to buy some more books!  )