O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

eXtreme .NET: Introducing eXtreme Programming Techniques to .NET Developers

Book Description

"At last, somebody has introduced eXtreme Programming techniques to the world of .NET! Through enjoyable writing and tons of hands-on exercises, Dr. Neil explains how to use the best techniques from eXtreme Programming to vastly improve developer productivity within the .NET Framework."

—George Bullock, Program Manager, Microsoft Corporation

eXtreme .NET shows developers and team leaders how to incorporate eXtreme Programming (XP) practices with .NET-connected technologies to create high-quality, low-cost code that will build better software. This practical, realistic guidebook systematically covers key elements of XP methodology in the specific context of the Microsoft .NET Framework, Visual Studio .NET, Visual C#, and related Microsoft .NET-enabled applications.

Leading .NET and XP mentor Dr. Neil Roodyn covers planning, task definition, test-driven development, user interfaces, refactoring, spiking, pair programming, and much more. Dr. Neil offers field-proven advice for everything from automating builds to integrating third-party libraries. He also incorporates valuable exercises and presents a start-to-finish case study that shows exactly how XP and Microsoft .NET interoperate throughout an entire development project. Coverage includes

  • Where to start if you've never used XP or other Agile methods before

  • Pair programming: Turning .NET programming into a collaborative game

  • Test-Driven development: Making sure your .NET code works as intended while it's easiest to fix

  • Refactoring: Organizing your .NET code to improve flexibility and enable changes more readily

  • Continuous integration and automated build/test: Enhancing quality in distributed, component-based systems

  • Spiking: Using rapid experimentation to validate your expectations about behavior in the .NET Framework

  • The importance of customer input to successful projects

  • How to test .NET user interfaces and third-party libraries

  • The Microsoft .NET Framework is today's most productive development platform. XP represents a fundamental breakthrough in building higher-value software. Combine them: transform your team into an eXtreme .NET team that can accomplish more than ever before. This book will show you how—starting with your very next project.

    Dr. Neil Roodyn has been actively involved with eXtreme Programming since 1999, and founded Sydney's eXtreme Programming Activity Club (SyXPAC). He has helped drive the adoption of the .NET Framework in Australia through his work as a project leader, consultant, instructor, and mentor. His clients have ranged from Microsoft to Rogue Wave and he has helped launch several software startups. Dr. Neil holds a Ph.D. from University College London where he specialized in software architectures for real-time systems.

    © Copyright Pearson Education. All rights reserved.

    Table of Contents

    1. Copyright
      1. Dedication
    2. Microsoft .NET Development Series
      1. Titles in the Series
    3. Acknowledgments
    4. Foreword
    5. 0. Setup
      1. What Do You Want?
      2. Terminology
      3. How to Read This Book
      4. The Team
      5. Conclusion
    6. 1. eXtreme Programming Overview
      1. What Is eXtreme Programming?
      2. Working in The Ever-Faster-Changing World
        1. The Answers According to Microsoft
        2. The Answers According to XP
        3. How .NET and XP Fit Together
      3. You Don’t Have to “Believe” in XP to Learn Something from It
      4. The Roles
      5. What .NET Developers Can Gain from XP Practices
      6. XP Practices Covered in This Book
        1. Whole Team (a.k.a. On-Site Customer)
        2. Planning Game
        3. Pair Programming
        4. Test-Driven Development
        5. Constant Refactoring
        6. Spiking
        7. Continuous Integration
        8. Stand-Up Meetings
      7. The Other Practices
      8. The 4 (+1) Key Values
        1. Communication
        2. Simplicity
        3. Feedback
        4. Courage
        5. Respect
      9. Conclusion
    7. 2. Pair Programming
      1. I’m Not Sitting with Him!
        1. The Professional Attitude
        2. Get With the Winning Approach
      2. It’s a Game
        1. Exercise 2-1: Game to Teach Pair Programming
        2. Exercise 2-2: Step-by-Step Exercise to Get a Feel for Pair Programming
      3. Try It Together
        1. Exercise 2-3: Exercises for Two Developers to Work On Together
      4. Conclusion
    8. 3. How to Solve Big Problems
      1. The Software Development Problem
      2. The Genius Is in the Simplicity
        1. Big, Complex Solutions
        2. The Genius Function
        3. Example of Problem Breakdown
      3. Problem Breakdown Exercise
        1. Exercise 3-1: Defining the Story
        2. Exercise 3-2: Breaking Down the Stories into Small Subtasks
        3. Exercise 3-3: Breaking Down the Subtasks Even Further
      4. Exercises to Help You Toward Genius
        1. Exercise 3-4: The Shopping Cart
        2. Exercise 3-5: Derived Stock Market Data
        3. Exercise 3-6: What’s the Weather Like?
        4. Exercise 3-7: The Unfinished Solution
      5. Conclusion
    9. 4. Test-Driven Development
      1. Is It Possible to Write Bug-Free Code?
      2. Increase the Quality of Your Code
      3. The Big Why
      4. Introducing NUnit
      5. Creating a New Project in C# Using NUnit
        1. Exercise 4-1: Get NUnit Up and Running
        2. Exercise 4-2: Write a Test and Add Some Functionality
        3. Exercise 4-3: Plug the Business Logic into the User Interface
        4. Exercise 4-4: Plug the Business Logic into a Different User Interface
        5. Exercise 4-5: Write a Test to Fix a Bug
        6. Exercise 4-6: Write a Test and Then Add Another Function
        7. Exercise 4-7: Write a Test and Then Extract the Method
        8. Exercise 4-8: Add the UI for Subtraction
        9. Exercise 4-9: Extract Functionality Out of the UI Layer
      6. How Do You Feel About TDD?
        1. Exercise 4-10: Without Tests
        2. Exercise 4-11: With Tests
        3. Confidence Test
      7. Conclusion
    10. 5. Refactoring
      1. What Is Refactoring
      2. Do It As You Go
      3. The Importance of Tests
      4. The Benefits
        1. Feedback
        2. Communication
        3. Simplicity
      5. Some More Big “Why” Questions
        1. Why Should I Do It When No One Else Does?
        2. Why Do Something That Doesn’t Add Any New Features to the Code?
      6. Let’s Start Refactoring
        1. Exercise 5-1: Currency Converter Refactoring
          1. Step One: Extract Method
          2. Step Two: Extract Class
          3. Step Three: Move Method and Extract Method
          4. Step Four: Replace Type Code with State/Strategy and Replace Conditional with Polymorphism
          5. Step Five: Replace Conditional with Polymorphism
          6. Step Six: Customize
      7. When Not to Refactor
      8. Conclusion
    11. 6. Spiking
      1. You Can’t Know Everything
      2. Raise Your Confidence
      3. Let’s Discover Something
        1. Exercise 6-1: Spiking How Time Zone Data Works in Windows
          1. GetTimeZones Function
          2. GetTimeZoneInfo and Related Functions
      4. Encode the Knowledge in Tests
      5. Go Where No Man Has Gone Before
        1. Exercise 6-2: Spike Web Services Without a Web Server
        2. Exercise 6-3: Spike Session State Across Service Calls
        3. Exercise 6-4: Spike Drag and Drop Documents in a Rich Text Control
      6. Conclusion
    12. 7. Automating the Build Process
      1. What is the Build Process?
      2. What’s Wrong with F5?
      3. I Make Mistakes
      4. If a Computer Can Do It, Then It Should
      5. Do It the Old Way
        1. Exercise 7-1: Creating an Integration Build Batch File
      6. Introduction to NAnt
        1. Exercise 7-2: Using NAnt to Automate the Build Process
      7. Conclusion
    13. 8. More Testing
      1. User-Interface Testing
        1. It’s Not Possible!
        2. “We Are a Special Case”
      2. An Issue of Architecture
        1. Exercise 8-1: Building a Thin GUI Layer to Make Testing Easier
        2. Stamper Part Two
        3. Stamper Part Three
        4. Exercise 8-2: Using Reflection to Test the GUI
        5. Exercises on Your Own
          1. Exercise 8-3: Building a Small System
          2. Exercise 8-4: Changing the GUI with Confidence
      3. Testing Third-Party Libraries
        1. We All Do It
        2. The .NET Framework Is a Third-Party Library!
        3. Component-Based Software Development Is Here
        4. If It Goes Wrong, We’re All in the Brown Stuff
        5. Put the Alarms in Place
      4. Step-by-Step Exercises Using a Third-Party Library
        1. Exercise 8-5: Setting Up NUnit (Again!)
        2. Exercise 8-6: The Quick Breadth Test
        3. Exercise 8-7: The Functional Depth Test
        4. Exercise 8-8: Testing for Exceptions
        5. Exercise 8-9: Examining the Code
        6. Exercise 8-10: Writing a Breadth Test
        7. Exercise 8-11: Getting the Breadth Test Running
        8. Exercise 8-12: Writing a Test to Break the Code
        9. Exercise 8-13: Forcing an Intermittent Error
      5. Coding with Protection
        1. Exercise 8-14: Protecting Yourself Against the Change
        2. Exercise 8-15: Plugging In the New Changed Library
      6. Conclusion
    14. 9. Step-by-Step Development
      1. Step by Step by Step
      2. A Strategy to Lower the Risk of Failure
        1. Step-by-Step Exercise to Demonstrate the Small-Step Approach
          1. The Customer Meeting
          2. The Story Cards
          3. Iteration 0
          4. Iteration 1
          5. Story 1: Add Alarm
          6. Story 2: Delete (Remove) an Alarm
          7. Story 3: Alarm Rings Continuously Until I Shut It Off
          8. Customer Meeting
          9. Following Iterations
      3. Conclusion
    15. I. Guideline Solutions for Task Breakdown Exercises in Chapter 3
      1. Exercise 3-4: The Shopping Cart
      2. Exercise 3-5: Derived Stock Market Data
      3. Exercise 3-6: What’s the Weather Like?
      4. Exercise 3-7: The Unfinished Solution
    16. II. Building Your Own Simple Test Framework with Excel
    17. III. Recommended Reading
      1. Important Books for Software Developers Working in Teams
      2. XP-Specific Books
      3. XP-Specific Web Sites
      4. Agile Techniques Books
      5. Agile Web Sites
      6. Agile Tools Web Sites
      7. A Book About Change