本书主题:
如何预见你要构筑的软件系统
如何编写有效的用户故事和验收测试用例
如何计划项目的迭代与发布周期
如何编写业务导向代码
有关集成、重构、测试与交付的最佳实践
如何应对实施XP的挑战
极限编程爱好者必备的一站式指南!
弹指间,极限编程(XP)已成为先进的敏捷方法中的代表模型。本书是一本简明、易懂、全面的XP指南,包含了XP的诸多最佳实践,对于实施XP大有裨益!
本书并非仅仅停留在介绍XP的基本概念和原则——如简单性、沟通和反馈,更重要的是演示了如何在实际项目中综合运用这些原则。本书通过一个完整的案例分析,描述了整个项目生命周期、每一项关键任务以及每一个XP参与者(开发人员。管理人员及客户)的角色。您想从XP中受益吗?您想一帆风顺地实施XP吗?那就从本书开始吧!
Foreword by Scott W.Ambler
Preface
Introduction
part I The Game
Chapter 1 Extreme Principles
Work with Your Customers
Use Metaphors to Describe Difficult Concepts
Plan
Keep Meetings Short
Test First
Keep it Simple
Program in Pairs
Code to Standards
Own it Collectively
Integrate Continuously
Refactor
Release in Small Increments
Don't Burn Out (40-Hour Work Week)
Embrace Change
Chapter 2 The Players
Two Teams
The Customer Team
The Development Team
The Role of Roles
Establishing Rights
Conclusion
part II onceptualizing the System
Chapter 3 Creating a Vision of the System
Conceptualizing the System
The Vision Card
The Metaphor
Metaphors for Development
Conclusion
Chapter 4 Writing User Stories
The Philosophy of User Stories
User Stories
Numbering the Stack
Conclusion
Appendix to Chapter 4
Chapter 5 Writing Acceptance Tests
What Is an Acceptance Test?
Writing Tests
Difficulty with Acceptance Tests
Infinitely Many Acceptance Tests
Automating Acceptance Tests
Conclusion
Chapter 6 One Simple Solution
What Are We Looking for?
Keep It Simple
Conceptual Solution Spikes
Conclusion
Chapter 7 Watching Our Words
The Problem
What's in a Name
Constant Refactoring and Communicating
Conclusion
part III Planning
Chapter 8 Providing Estimates
Providing Estimates
Assumptions
Splitting
Planning Spikes
Conclusion
Chapter 9 Planning Releases
Velocity
The Cost of the Release
Establishing Priorities
Pair Programming
Creating the Release Plan
Conclusion
Chapter 10 Planning Iterations
Creating a Series of Iterations
The Setting for Iteration Planning
The First Iteration
Subsequent Iterations
Scheduling Iterations
Conclusion
Chapter 11 Tactical Planning
Beginning an iteration
Volunteering for Tasks
Standup Meetings
Tracking the Project
Finishing Early
Conclusion
part IV Development
Chapter 12 Pair Programming
The Mechanics of Pair Programming
Development as a Conversation
Peer Pressure
Double the Fun
The Net Effect
As Fast as the Slowest
Conclusion
Chapter 13 Test First
The XP Project
Why Test?
What to Test
When to Test
How to Test: A Testing Framework
Warranted Assumptions Revisited:
Test Driven Development
Example
A Case for Test Driven Development
Conclusion
Chapter 14 Design
Design and XP
Where Design Patterns Fit in XP
Architecture and XP
Agile Modeling
What is Agile Modeling (AM)?
Overview of the Values, Principles, and Practices of Agile Modeling (AM)
Conclusion
Chapter 15 Code With Intention
What's in a Name
Simplicity is the Ultimate Complexity
Warranted Assumptions
Let the Compiler Tell You
"No Comment"
Collective Code Ownership
Better to Burn Out than to Fade Away?
Happy Developers Are Productive Developers
Get a Life
Conclusion
Chapter 16 Refactoring
Examples of Refactorings
Courage
Code Smells
When to Refactor
The Two Hats
Refactoring to Patterns
Example of Refactoring
Conclusion
Chapter 17 Relentless Integration
Some Practical Advice
Only Check in When Tests Pass at 100 Percent
An Antipattern
Approaches to Integration
What About Code Reviews
The Impact of Collective Code Ownership
Conclusion
part V Delivery
chapter 18 Delivering the System
Delivery Day
Productionizing
Testing
Celebrating Victories
part VI Additional Topics
Chapter 19 Adopting and Adapting XP
Understanding XP
Adopting XP
Methods of Adoption
Adapting XP
XP Practices
Return on Investment
Conclusion
Chapter 20 Scaling XP
Large-Scale Development
Organizing the Large XP Project
Open and Honest Communication
Integration
The Importance of Good People
Conclusion
Chapter 21 The Future of XP
Where XP is Going
On to the Battlefield
A Holonic Approach to XP
Software Development as a Crt
Evolving XP
Appendix: Example
Bibliography
Index
The Need to be Extreme
Both business people and software developers often view traditional software development techniques as too slow. Business people view software as a competitive advantage, and a competitive advantage can never be realized too quickly. Software developers believe that their traditional software development (processes create too much over head in their quest to deliver this advantage as quickly as possible.
The need to deliver software more quickly caused Kent Beck, Ward Cunningham, and Ron Jeffries to explore the extremes of certain development practices. The first XP project, the Chrysler Comprehensive Compensation system (code name C3), was, on one hand, constrained and, on the other, pushed to its limits. This practice was called "setting the dials to ten." The result was a breakthrough in the software development called XP.
Beck was certainly the driving force behind taking this project, and the multitude of others that have followed, to the extreme, and he continues to evolve XP. His vision continues as he asks us to question the basic principles of software engineering. Naturally, many of these principles are being replaced with new and better ones. New principles, such as working with a real live customer instead of a specification, are quickly gaining acceptance in the software community. The idea of creating tests before the software is written is quickly becoming a vital part of every software development process.
This book attempts to capture one point in the evolution of XP. We have examined the principles and have created what we believe to be effective practices. As a result, we believe that this short guide serves as a practical one from which to learn XP.
We used some of the XP principles to write this book (adapted, of course, for book writing). For example, various things that one of our customers felt we needed to cover were written on index cards and scheduled into the iterations of the book. This book has been continuously integrated and refactored. Hopefully, you, another customer, will like the finished product.
Follow Up
To obtain the code from the appendix as well as other information about this book and XP in general, we invite you to visit Saorsa Development Inc.'s web site at http://www.saorsa.com.
Acknowledgments
We would iike to thank Ward Cunningham and Kent Beck for inventing a superb software development process and for continuing to share their software development experience with us. We also thank Scott Ambler and Craig Larman for all of their help. Thanks to all of the people who contributed their wisdom to the "Writing User Stories" tutorial at XP2001 and XPUniverse (you know who you are). We'd like to thank Dietrich Charisius, Andrei Ivanov, Alexander Kitaev, Fyodor lsakov, Vladislav Protasov, Jaroslav Psenicka, Boris Blajer, Alexei Zubov, Lukas Neterda, Radek Dvorak, Alexander Shatalin, Danila Ermakov, Nick Shevelev, Oleg Kushnikov, Vladimir Petko, Tomas Pinos, Jan Hurt, Vladimir Orlov, all of the XPers in TogetherSoft's advanced technology group. We benefitted from the review work of Todd Hansen, Pete McBreen, John Szucs, and Patrick Wall. We also thank Zina Miller and Susan Wiederhold for editing initial versions of this manu There have been others who have indirectly contributed to this work. They include Ken Deery, Fred George, Bill Greenhalgh, Pete McBreen, Todd Medlin, Chuck Proffer, Tomasz M(ildner, Ken Ritchie, Bob Rosenberg, Ivan Tomek, and Andre Trudel. Finally, we owe a great deal of thanks to and Lisa Juliani for their courage and support to the writing of this book.
Peter Coad
which lead