ebook img

Agile principles, patterns, and practices in C# / Robert C. Martin PDF

944 Pages·2007·12.97 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Agile principles, patterns, and practices in C# / Robert C. Martin

AAggiillee PPrriinncciipplleess,, PPaatttteerrnnss,, aanndd PPrraaccttiicceess iinn CC## BByy MMaarrttiinn CC.. RRoobbeerrtt,, MMaarrttiinn MMiiccaahh .............................................................................................. PPuubblliisshheerr:: PPrreennttiiccee HHaallll PPuubb DDaattee:: JJuullyy 2200,, 22000066 PPrriinntt IISSBBNN--1100:: 00--1133--118855772255--88 PPrriinntt IISSBBNN--1133:: 997788--00--1133--118855772255--44 PPaaggeess:: 776688 TTaabbllee ooff CCoonntteennttss || IInnddeexx WWiitthh tthhee aawwaarrdd--wwiinnnniinngg bbooookk AAggiillee SSooffttwwaarree DDeevveellooppmmeenntt:: PPrriinncciipplleess,, PPaatttteerrnnss,, aanndd PPrraaccttiicceess,, RRoobbeerrtt CC.. MMaarrttiinn hheellppeedd bbrriinngg AAggiillee pprriinncciipplleess ttoo tteennss ooff tthhoouussaannddss ooff JJaavvaa aanndd CC++++ pprrooggrraammmmeerrss.. NNooww ..NNEETT pprrooggrraammmmeerrss hhaavvee aa ddeeffiinniittiivvee gguuiiddee ttoo aaggiillee mmeetthhooddss wwiitthh tthhiiss ccoommpplleetteellyy uuppddaatteedd vvoolluummee ffrroomm RRoobbeerrtt CC.. MMaarrttiinn aanndd MMiiccaahh MMaarrttiinn,, AAggiillee PPrriinncciipplleess,, PPaatttteerrnnss,, aanndd PPrraaccttiicceess iinn CC##.. TThhiiss bbooookk pprreesseennttss aa sseerriieess ooff ccaassee ssttuuddiieess iilllluussttrraattiinngg tthhee ffuunnddaammeennttaallss ooff AAggiillee ddeevveellooppmmeenntt aanndd AAggiillee ddeessiiggnn,, aanndd mmoovveess qquuiicckkllyy ffrroomm UUMMLL mmooddeellss ttoo rreeaall CC## ccooddee.. TThhee iinnttrroodduuccttoorryy cchhaapptteerrss llaayy oouutt tthhee bbaassiiccss ooff tthhee aaggiillee mmoovveemmeenntt,, wwhhiillee tthhee llaatteerr cchhaapptteerrss sshhooww pprroovveenn tteecchhnniiqquueess iinn aaccttiioonn.. TThhee bbooookk iinncclluuddeess mmaannyy ssoouurrccee ccooddee eexxaammpplleess tthhaatt aarree aallssoo aavvaaiillaabbllee ffoorr ddoowwnnllooaadd ffrroomm tthhee aauutthhoorrss'' WWeebb ssiittee.. RReeaaddeerrss wwiillll ccoommee aawwaayy ffrroomm tthhiiss bbooookk uunnddeerrssttaannddiinngg AAggiillee pprriinncciipplleess,, aanndd tthhee ffoouurrtteeeenn pprraaccttiicceess ooff EExxttrreemmee PPrrooggrraammmmiinngg SSppiikkiinngg,, sspplliittttiinngg,, vveelloocciittyy,, aanndd ppllaannnniinngg iitteerraattiioonnss aanndd rreelleeaasseess TTeesstt--ddrriivveenn ddeevveellooppmmeenntt,, tteesstt--ffiirrsstt ddeessiiggnn,, aanndd aacccceeppttaannccee tteessttiinngg RReeffaaccttoorriinngg wwiitthh uunniitt tteessttiinngg PPaaiirr pprrooggrraammmmiinngg AAggiillee ddeessiiggnn aanndd ddeessiiggnn ssmmeellllss TThhee ffiivvee ttyyppeess ooff UUMMLL ddiiaaggrraammss aanndd hhooww ttoo uussee tthheemm eeffffeeccttiivveellyy OObbjjeecctt--oorriieenntteedd ppaacckkaaggee ddeessiiggnn aanndd ddeessiiggnn ppaatttteerrnnss HHooww ttoo ppuutt aallll ooff iitt ttooggeetthheerr ffoorr aa rreeaall--wwoorrlldd pprroojjeecctt WWhheetthheerr yyoouu aarree aa CC## pprrooggrraammmmeerr oorr aa VViissuuaall BBaassiicc oorr JJaavvaa pprrooggrraammmmeerr lleeaarrnniinngg CC##,, aa ssooffttwwaarree ddeevveellooppmmeenntt mmaannaaggeerr,, oorr aa bbuussiinneessss aannaallyysstt,, AAggiillee PPrriinncciipplleess,, PPaatttteerrnnss,, aanndd PPrraaccttiicceess iinn CC## iiss tthhee ffiirrsstt bbooookk yyoouu sshhoouulldd rreeaadd ttoo uunnddeerrssttaanndd aaggiillee ssooffttwwaarree aanndd hhooww iitt aapppplliieess ttoo pprrooggrraammmmiinngg iinn the .NET Framework. Agile Principles, Patterns, and Practices in C# By Martin C. Robert, Martin Micah ............................................... Publisher: Prentice Hall Pub Date: July 20, 2006 Print ISBN-10: 0-13-185725-8 Print ISBN-13: 978-0-13-185725-4 Pages: 768 Table of Contents | Index Copyright Robert C. Martin Series Foreword Foreword Preface Acknowledgments About the Authors Section I. Agile Development Chapter 1. Agile Practices The Agile Alliance Principles Conclusion Bibliography Chapter 2. Overview of Extreme Programming The Practices of Extreme Programming Conclusion Bibliography Chapter 3. Planning Initial Exploration Release Planning Iteration Planning Defining "Done" Task Planning Iterating Tracking Conclusion Bibliography Chapter 4. Testing Test-Driven Development Acceptance Tests Serendipitous Architecture Conclusion Bibliography Chapter 5. Refactoring A Simple Example of Refactoring: Generating Primes Conclusion Bibliography Chapter 6. A Programming Episode The Bowling Game Conclusion Overview of the Rules of Bowling Section II. Agile Design Chapter 7. What Is Agile Design? Design Smells Why Software Rots The Copy Program Conclusion Bibliography Chapter 8. The Single-Responsibility Principle (SRP) Defining a Responsibility Separating Coupled Responsibilities Persistence Conclusion Bibliography Chapter 9. The Open/Closed Principle (OCP) Description of OCP The Shape Application Conclusion Bibliography Chapter 10. The Liskov Substitution Principle (LSP) Violations of LSP Factoring Instead of Deriving Heuristics and Conventions Conclusion Bibliography Chapter 11. The Dependency-Inversion Principle (DIP) Layering A Simple DIP Example The Furnace Example Conclusion Bibliography Chapter 12. The Interface Segregation Principle (ISP) Interface Pollution Separate Clients Mean Separate Interfaces Class Interfaces versus Object Interfaces The ATM User Interface Example Conclusion Bibliography Chapter 13. Overview of UML for C# Programmers Class Diagrams Object Diagrams Collaboration Diagrams State Diagrams Conclusion Bibliography Chapter 14. Working with Diagrams Why Model? Making Effective Use of UML Iterative Refinement When and How to Draw Diagrams Conclusion Chapter 15. State Diagrams The Basics Using FSM Diagrams Conclusion Chapter 16. Object Diagrams A Snapshot in Time Active Objects Conclusion Chapter 17. Use Cases Writing Use Cases Diagramming Use Cases Conclusion Bibliography Chapter 18. Sequence Diagrams The Basics Advanced Concepts Conclusion Chapter 19. Class Diagrams The Basics An Example Class Diagram The Details Conclusion Bibliography Chapter 20. Heuristics and Coffee The Mark IV Special Coffee Maker OOverkill Bibliography Section III. The Payroll Case Study Chapter 21. COMMAND and ACTIVE OBJECT: Versatility and Multitasking Simple Commands Transactions Undo Method Active Object Conclusion Bibliography Chapter 22. TEMPLATE METHOD and STRATEGY: Inheritance versus Delegation Template Method Strategy Conclusion Bibliography Chapter 23. Facade and Mediator Facade Mediator Conclusion Bibliography Chapter 24. Singleton and Monostate Singleton Monostate Conclusion Bibliography Chapter 25. Null Object Description Conclusion Bibliography Chapter 26. The Payroll Case Study: Iteration 1 Rudimentary Specification Analysis by Use Cases Reflection: Finding the Underlying Abstractions Conclusion Bibliography Chapter 27. The Payroll Case Study: Implementation Transactions Main Program The Database Conclusion About This Chapter Bibliography Section IV. Packaging the Payroll System Chapter 28. Principles of Package and Component Design Packages and Components Principles of Component Cohesion: Granularity Principles of Component Coupling: Stability Conclusion Chapter 29. Factory A Dependency Problem Static versus Dynamic Typing Substitutable Factories Using Factories for Test Fixtures Importance of Factories Conclusion Bibliography Chapter 30. The Payroll Case Study: Package Analysis Component Structure and Notation Applying the Common Closure Principle (CCP) Applying the Reuse/Release Equivalence Principle (REP) Coupling and Encapsulation Metrics Applying the Metrics to the Payroll Application The Final Packaging Structure Conclusion Bibliography Chapter 31. Composite Composite Commands Multiplicity or No Multiplicity Conclusion Chapter 32. Observer: Evolving into a Pattern The Digital Clock The OBSERVER Pattern Conclusion Bibliography Chapter 33. Abstract Server, Adapter, and Bridge Abstract Server Adapter Bridge Conclusion Bibliography Chapter 34. PROXY and GATEWAY: Managing Third-Party APIs Proxy Databases, Middleware, and Other Third-Party Interfaces Table Data Gateway Using Other Patterns with Databases Conclusion Bibliography Chapter 35. Visitor Visitor Acyclic Visitor Decorator Extension Object Conclusion Bibliography Chapter 36. State Nested Switch/Case Statements Transition Tables The State Pattern Classes of State Machine Application Conclusion Bibliography Chapter 37. The Payroll Case Study: The Database Building the Database A Flaw in the Code Design Adding an Employee Transactions Loading an Employee What Remains? Chapter 38. The Payroll User Interface: MODEL VIEW PRESENTER The Interface Implementation Building a Window The Payroll Window The Unveiling Conclusion Bibliography Appendix A. A Satire of Two Companies Appendix B. What Is Software? Afterword InsideFrontCover Manifesto for Agile Software Development Principles behind the Agile Manifesto InsideBackCover Practices of Extreme Programming The Principles of Object Oriented Design Index Copyright Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and Government Sales, (800) 382-3419 [email protected] For sales outside the United States, please contact: International Sales [email protected] Visit us on the Web: www.prenhallprofessional.com Library of Congress Cataloging-in-Publication Data Martin, Robert C. Agile principles, patterns, and practices in C# / Robert C. Martin, Micah Martin. p. cm. Includes bibliographical references and index. ISBN 0-13-185725-8 (hardcover : alk. paper) 1. Object-oriented programming (Computer science) 2. C# (Computer program language) 3. Computer software--Development. I. Martin, Micah. II. Title. QA76.64.M383 2006 005.1'17dc22 2006013350 Copyright © 2007 Pearson Education, Inc. Illustrations on the following pages are copyright Jennifer Kohnke: xxiii, 1, 3, 13, 23, 31, 41, 55, 103, 115, 121, 135, 153, 293, 299, 311, 325, 331, 345, 349, 365, 413, 415, 437, 447, 467, 471, 495, 507, 543, 579, 603

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.