logo资料库

Adaptive code via C#.pdf

第1页 / 共433页
第2页 / 共433页
第3页 / 共433页
第4页 / 共433页
第5页 / 共433页
第6页 / 共433页
第7页 / 共433页
第8页 / 共433页
资料共433页,剩余部分请下载后查看
Contents
Introduction
PART I: AN AGILE FOUNDATION
Chapter 1 Introduction to Scrum
Scrum versus waterfall
Roles and responsibilities
Artifacts
The sprint
Problems with Scrum and Agile
Conclusion
Chapter 2 Dependencies and layering
The definition of dependency
Managing dependencies
Layering
Conclusion
Chapter 3 Interfaces and design patterns
What is an interface?
Adaptive design patterns
Further versatility
Conclusion
Chapter 4 Unit testing and refactoring
Unit testing
Refactoring
Conclusion
PART II: WRITING SOLID CODE
Chapter 5 The single responsibility principle
Problem statement
SRP and the Decorator pattern
Using the Strategy pattern instead of switch
Conclusion
Chapter 6 The open/closed principle
Introduction to the open/closed principle
Extension points
Protected variation
Conclusion
Chapter 7 The Liskov substitution principle
Introduction to the Liskov substitution principle
Contracts
Covariance and contravariance
Conclusion
Chapter 8 Interface segregation
A segregation example
Client construction
Splitting interfaces
Conclusion
Chapter 9 Dependency injection
Humble beginnings
Beyond simple injection
Conclusion
PART III: ADAPTIVE SAMPLE
Chapter 10 Adaptive sample: Introduction
Trey Research
Initial backlog
Chapter 11 Adaptive sample: Sprint 1
Planning
“I want to create rooms for categorizing conversations.”
“I want to view a list of rooms that represent conversations.”
“I want to view the messages that have been sent to a room.“
“I want to send plain text messages to other room members.”
Sprint demo
Sprint retrospective
Chapter 12 Adaptive sample: Sprint 2
Planning
“I want to send markdown that will be correctly formatted.”
“I want to filter message content so that it is appropriate.”
“I want to serve hundreds of users concurrently.”
Sprint demo
Sprint retrospective
Appendix A: Adaptive Tools
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
About the author
Free ebooks
Tell us what you think!
Adaptive Code via C#: Agile coding with design patterns and SOLID principles Gary McLean Hall
PUBLISHED BY Microsoft Press A division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2014 by Gary McLean Hall. All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2014943458 ISBN: 978-0-7356-8320-4 Printed and bound in the United States of America. First Printing Microsoft Press books are available through booksellers and distributors worldwide. If you need support related to this book, email Microsoft Press Book Support at mspinput@microsoft.com. Please tell us what you think of this book at http://aka.ms/tellpress. This book is provided “as-is” and expresses the author’s views and opinions. The views, opinions and information expressed in this book, including URL and other Internet website references, may change without notice. Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred. Microsoft and the trademarks listed at http://www.microsoft.com on the “Trademarks” webpage are trademarks of the Microsoft group of companies. All other marks are property of their respective owners. Acquisitions Editor: Devon Musgrave Developmental Editor: Devon Musgrave Project Editor: Devon Musgrave Editorial Production: Online Training Solutions, Inc. (OTSI) Technical Reviewer: Jeremy Johnson Copyeditor: Kathy Krause (OTSI) Indexer: Krista Wall (OTSI) Cover: Twist Creative • Seattle and Joel Panchot
For Amelia Rose —Gary McLean HaLL
This page intentionally left blank
Contents at a glance Introduction PART I AN AGILE FOUNDATION CHAPTER 1 CHAPTER 2 CHAPTER 3 CHAPTER 4 Introduction to Scrum Dependencies and layering Interfaces and design patterns Unit testing and refactoring PART II WRITING SOLID CODE CHAPTER 5 CHAPTER 6 CHAPTER 7 CHAPTER 8 CHAPTER 9 The single responsibility principle The open/closed principle The Liskov substitution principle Interface segregation Dependency injection PART III ADAPTIVE SAMPLE CHAPTER 10 CHAPTER 11 CHAPTER 12 Adaptive sample: Introduction Adaptive sample: Sprint 1 Adaptive sample: Sprint 2 Appendix A: Adaptive tools Appendix B: GitHub code samples Index About the author xv 3 43 93 125 169 207 217 251 281 325 337 365 379 online 387 403
This page intentionally left blank
Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv PART I AN AGILE FOUNDATION Chapter 1 3 Introduction to Scrum Scrum versus waterfall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Roles and responsibilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Product owner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Scrum master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Development team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Pigs and chickens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 The Scrum board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Charts and metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Backlogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 The sprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Release planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Sprint planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Daily Scrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Sprint demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Sprint retrospective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Scrum calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Problems with Scrum and Agile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Maladaptive code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 What do you think of this book? We want to hear from you! Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you. To participate in a brief online survey, please visit: microsoft.com/learning/booksurvey vii
分享到:
收藏