Java Extreme Programming Cookbook (英語) ペーパーバック – 2003/3/1
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Extreme Programming does not mean programming naked while rollerblading down the side of the Grand Canyon. It does mean a new approach to software development that is both radical and common-sense. Unlike many software development methodologies, XP has been accepted quickly because its core practices--particularly code sharing, test-first development, and continuous integration--resonated immediately with software developers everywhere. Instead of impressing developers with a body of theory, XP got programmers to say, "Yeah, that's how I'd like to work."
Oddly enough, although most developers turn to Extreme Programming methods in order to code real, hands-on, and extensible projects quickly ("Code comes first"), most books on Extreme Programming insist on focusing on the theory and not the practice.
Not the Java Extreme Programming Cookbook.
Brimming with over 100 "recipes" for getting down to business and actually doing XP, the Java Extreme Programming Cookbook doesn't try to "sell" you on XP; it succinctly documents the most important features of popular open source tools for XP in Java--including Ant, Junit, HttpUnit, Cactus, Tomcat, XDoclet--and then digs right in, providing recipes for implementing the tools in real-world environments.
Each recipe offers solutions that help you put an extreme programming environment together: then provides code for automating the build process and testing. Although the time saved using any one of these solutions will more than pay for the book, Java Extreme Programming Cookbook offers more than just a collection of cut-and-paste code. Each recipe also includes explanations of how and why the approach works, so you can adapt the techniques to similar situations.
One of the biggest challenges facing developers today is sorting through the wide variety of tools available form various source and figuring out how to them effectively. The recipes in Java Extreme Programming Cookbook showcase how to use the most important features of these XP tools. Many of these tools are geared towards unit testing, while others are invaluable for continuous integration; with these practical examples, you'll be able to choose the most effective tools to accomplish your goals, then implement them in a cohesive development environment quickly.
If you want to set up a test-driven development environment that allows you to focus on writing testable code--now--this book will prove invaluable.
Eric Burke is an O'Reilly author and a Principal Software Engineer with Object Computing, Inc. in St Louis, MO. He specializes in Java and his job duties include consulting, training and public speaking engagements. Brian M. Coyner is a Senior Software Engineer with Object Computing, Inc. in St Louis, MO. He has a B.S. in Computer Science from Southeast Missouri State University, and specializes in Java training and consulting. When he is not working, which is rare, Brian enjoys playing the guitar and spending time with his family.
The authors obviously have a strong belief in testing. Here is a list from a companion article from the publisher's web site
"Top 12 Reasons to Write Unit Tests"
1. Tests Reduce Bugs in New Features
2. Tests Reduce Bugs in Existing Features
3. Tests Are Good Documentation
4. Tests Reduce the Cost of Change
5. Tests Improve Design
6. Tests Allow Refactoring
7. Tests Constrain Features
8. Tests Defend Against Other Programmers
9. Testing Is Fun
10. Testing Forces You to Slow Down and Think
11. Testing Makes Development Faster
12. Tests Reduce Fear
Any of these ring true with you? They did with me too. I immediately bought the book. I initially wanted to learn about Mock Object's to help build test rigging for a complicated environment at work. After my success, I thought the book would end up on the bookshelf, but, because the book is so approachable and easy to read I found myself exploring other topics (in my case XDoclets and the discussion on XP in general). Check it out. It's a really great (and hands-on) introduction to this technology!
The XP stuff is covered quickly at the start, the meat of the book is in the "recipes", which walk you through configuring and using tools such as Ant, JUnit, Cactus etc. to build, unit-test and manage the development of a Java project.
The tools and tips the authors have chosen to include are a good representation of current practice, but I have a few reservations about the organization and structure of the book. My biggest worry is whether the target reader is actually likely to find many solutions. The authors seem to assume that everyone will pore over the several pages of "contents" at the front of the book every time they hit an obstacle, but in my experience they are just as likely to flip through pages or head for the index at the back, neither of which works particularly well. Worse than that, they may never think to look in the book in the first place - the "Extreme Programming" in the title may help it sell, but it's not something that jumps to mind when you are struggling to get Ant to deploy a web application to Tomcat.
That said, I'm glad I've got it, and some of the recipes now have little sticky notes to try and remind me that it's often an unexpectedly good place to look for Java development tips.
That being said the book fails somewhat, and thus the four stars, because it isn't organized in the problem/solution manner of the cookbooks. Most of the chapters are about testing but these are organized around the tool and not the problem. I would have preferred a section on web development that combined information on Tomcat and Ant, and one on web testing that talked about HTTPUnit, JUnit and Ant. In that way the book addresses problem areas without relying on the reader to understand the tool that would address his problem in addition to understanding his problem at hand.
My gripe is not so critical. The content in the book still remains very valuable and if you are looking for a concise how-to in these Java technologies you should have a look at this book.
Want define a classpath using Ant? Check out recipe 3.7. Wanna test a form in your web application? look at recipe 5.9. This book gives a bunch of good strategies to commonly encountered problems, but it's by no means a complete reference to the different technologies. But it will definitely get you started, and you'll be able to apply these different recipes to your own development environment.
The organization of the recipes and consistency between the chapters is where this book lost points in its rating. Want to know how to run JUnit with Ant? look in the Ant chapter. Want to know how to run HTTPUnit with Ant? Look in the HTTPUnit chapter. The Cactus chapter has a nice recipe about "When not to use Cactus" and the JUnitPerf chapter has a nice recipe about "When to use JUnitPerf" it would have been VERY helpful to have such sections for EACH technology discussed in the book, but alas the book is inconsistent.
Overall, I think this is a good book to jump-start you into an XP development environment using open source technologies.