Book Review: Spring Batch in Action
Categories: Development | Tags: Spring Batch, Java, Manning
By Mario Arias
Introduction
First of all, Batch applications isn't the fanciest thing that developers could make. Exists other topics in our world that could be more interesting, like RIA, HTML5, Ajax or things like that. But not everyone is a Rockstar Web Developer, some of us are most Shy Backend Boy type.
But even when Batch Applications aren't fancy at all, they could be very fun to develop. Some computer science concepts like Thread-Safe components could be handy in this type of application, and you know this is very fun (in a strange and masochist way that some geeks could suffer)
My first approach to Batch applications and Spring batch was when I work as developer on Easy Solutions (now Easy Solutions is one of my consulting clients). This was in the Spring Batch 1.0 beta time, and I wish I have this book in that time.
We still develop batch applications, but my main use for this book now is when I give classes. As a SpringSource Certified Instructor for Enterprise Integration with Spring one of the hardest topics is Spring Batch; and not 'cause the subject is hard, but 'cause the most of developers never touch batch applications.
Overall
The book is well written, although the four authors aren't english native-speakers is very fluid. My only concern is that is a little too serious.
The code examples have a good overall quality, but is written for many authors and they not share a common formatting standard. Another thing that I don't like is that the Hibernate examples are using HibernateTemplate a class that SpringSource discourages his use and soon will be deprecated.
Brace yourself, before you begin to read this book, you need to have a solid knowledge of the Spring Framework
In detail
Chapter 1: Introducing Spring Batch
This chapter expose you to the basic concepts that we need to make applications with Spring Batch. Also come with a little example that we'll go to expand and add features to rest of the book
Chapter 2: Spring Batch concepts
We'll go deeper on the concepts and the domain language. Very good information here and reference
Chapter 3: Batch configuration
This chapter act as a reference for the rest of the book. Very detailed information. But you could skip this chapter and come here later
Chapter 4: Running batch jobs
A very good coverage of all options to running batchs. I'll like to see Quartz integration, but you could always visit the Spring Framework documentation
Chapter 5: Reading data
>This the part of the Spring Batch that really shine above all. It's very hard to find and scenario where the ready-to-use components don't work; and if you find one, there's always the opportunity to write your own. This chapter covers reading from a JMS destination, a very uncommon scenario, but is nice to see how the framework authors think in all cases.
Chapter 6: Writing data
A good chapter with many examples and use cases, including JMS, database, flat files (a very common case), and email. Although Spring Batch isn't designed for that, you could combine this two chapters (Reading Data and Writing Data) to write Simples ETL process
Chapter 7: Processing data
Another good chapter. Very nice examples, including, filters, validators, chaining processors and the Driving Query Pattern
Chapter 8: Implementing bulletproof jobs
Other good part of the framework, Ver well explained, lot of options. You'll come often to this chapter as a reference
Chapter 9: Transaction management
This is by far the best chapter in all the book. Not only is very good explained, but the information contained here is very useful even without Spring Batch. A nice review of various transaction patterns including best effort, manual duplicate detection and idempotent messages. A must read for all architects and developers
Chapter 10: Controlling execution
This chapter cover how you can control de flow of your batch job. The information is good, very well explained, but if the control flow logic is very complicated I prefer to delegate this on Spring Integration, that have more components to accomplish this type of tasks
Chapter 11: Enterprise integration
This chapter covers how to use Spring Batch in conjunction with Spring Integration and Spring MVC. The example contained in this chapter is complicated and not for faint of heart. I advice you to have a good understanding of Spring Integration for a better result reading this chapter
Chapter 12: Monitoring jobs
Spring Batch let's you know the state of your jobs in many ways. This chapter cover all the options
Chapter 13: Scaling and parallel processing
Scaling jobs is one of the hardest part of designing and developing a Batch application. This chapter covers a great part of it, but don't lie yourself. Isn't easy, and is better to come here with some concepts of concurrents applications.
Chapter 14: Testing batch applications
This chapters covers how to test Spring Batch components in unit and integrations tests, using mocks and the classes that comes with Spring Framework for tests
Final thoughts
Batch applications isn't an easy topic, Spring Batch gives you a good ground where you can build your applications, but remains hard.
Don't buy this book thinking that you can master batch applications in a week. This book give's you a very good introduction, covers practically all the framework; but until you make a real application and have your hands dirty you can't fully understand batch applications and appreciate this book in all his glory
This book deserve 5 stars
October 1, 2011 | Share:






