Docstoc

abilities adaptability extensibility

Document Sample
abilities adaptability extensibility Powered By Docstoc
					                                                                                       index
A                                 Agile Principles, Patterns, and      Applying Domain-Driven Design
                                       Practices in C# 179, 181, 201        and Patterns 220
abilities 174                     AJAX 110, 266                        architecture 5, 24, 80, 128,
   adaptability 178               AND 303                                   265, 270
   extensibility 176              AnkhSVN 37                             assembly structure 70
   maintainability 174            anonymous delegate 186                 client-server 205
   readability 175                anticorruption layer 209, 299,         domain-centric 221
   reversibility 176                   304, 315                          enforcing its constraints 118
   testability 176                  benefits 300, 330                    fully layered 225
abstract classes 172, 237           Common Service Locator 339           hierarchy 220
abstract methods 188                creating 210–211, 300                horizontal layers 213
abstractions 170–172, 236, 243,     design 210, 338                      n-tier 219
      247, 251, 276, 329            injecting proxy class 336            simplified 221
   anonymous delegate 186           interfaces 300                       vertical layers 213
   Common Service Locator 252       internal use 211                   archived code, compression
   leaky 295                        introducing                             utility 36
   modules 192, 236                    incrementally 335, 340          ASMX web service 340–341
   patterns 349                     limitations 337                    ASMX. See Active Server
   risk 338                         migration to objects 334                Methods
acceptance testing 74, 78, 109      minimizing risk 337, 340           ASP.NET 169–170, 172
actionable report 119               object-relational mappers 339        GridView 282
Active Server Methods 340           public interface 338                 life cycle 289
adaptability 198                    seams 211                            MVC 288, 368
   encapsulation 178                testability and 300                  state management 289
adapter pattern 178, 210–211,       third-party components 329           Web Forms 288
      335, 348–349                  third-party                        aspect-oriented
ADO.NET 219, 306, 316                  dependencies 332–333                 programming 215–218,
   connection object 306            wrapper 209                             228, 311
afferent coupling 121             ANTS Performance Profiler 369          logging 215
   Utilities wedge 222            AOP. See aspect-oriented               tools 368
aggregate root 310                     programming                     ASPX 204, 292
aggregation 302                   app.config 241, 323                  assemblies 32, 124
agile practices 93                application life cycle 304             connection with tools 119
   adopting 198                   application logic, layering 70         final compiled 70
   code spike 41                  application server 206                 missing 33
agile principles 19               application services 222               third-party 33, 43, 322


                                                 371
372                                             INDEX



AssemblyInfo 69                   branching 40, 42                       integration tests 98, 115
assertions 98, 193                  isolation 42, 226                    interface-based design
asset management 301                refactoring 226                         192–193
Asynchronous Javascript and       branching logic, example 84            layering 218, 222
      XML. See AJAX               breaking change 239, 326               lazy loading 313
asynchronous system 13, 274       brittle tests 97                       life cycle 84
atomic commit 48                  brittleness 85, 97, 152, 170, 211,     maintainability 346
atomic transactions 35                 233, 246, 310                     maintenance 84
atomicity 36                      broken builds 62–64                    metrics 117
attributes 307                    broken tests 103                       Model-View-Presenter 288
   custom 215                     brownfield                             MVC disadvantages 289
Autofac 47, 368                     codebases 295, 304                   naming 235
autogenerated class 92              contamination 168                    new-test scenario 107
AutoMapper 265, 368                 refactorings 191                     open/closed principle
automated build process             sample 292                              185, 189
      109–110                     brownfield applications 31             pain points 9–10, 293
automated builds 58, 106, 113,      adding integration tests 109         patterns 179, 267, 349
      118, 127, 322, 337            anticorruption layer 339             planning 89
   artifacts 76                     business logic 303                   poor design 194
   broken 96                        caching 313–314                      production version 33
   check-in 64                                                           productivity 44
                                    challenging assumptions 11
   compilation 72                                                        readable 175
                                    clarity 150
   friction 130                                                          readme file 32
                                    code generation 318
   tools 60, 368                                                         refactoring 212
                                    codebase 57
automated deployment 74                                                  reference errors 32
                                    comparing file versions 36
automated testing 19, 78, 83,                                            re-integrating tests 102
      91, 241                       contamination 83, 194
                                                                         reversibility 177
   code coverage 119                continuous integration 67
                                                                         reverting 354
   seams 212                        coupling 294
                                                                         single responsibility 184
   setting up 73                    data access techniques 323
                                                                         softer aspects 353
   tools 368                        DataSets 334                         solution file 32
automated tests 85–87, 116–117,     decoupling 259                       starting refactorings 266
      119, 137, 298, 304, 339       dependencies 33, 229                 testability 176
   continuous integration 67        dependency graphs 348                test-driven design 107
   pain points 85                   dependency inversion                 testing interactions 98
   types 89                            principle 253                     unit tests 90, 98
Automated Tests wedge 222           domain-centric 220                   untested deployments 321
automation 83                       duplicate code 200, 295              user interface 260
   batch files 60                   ecosystem 31                         version control 31, 53
   other candidates 133             existing database 113                version control systems 34
                                    extending 7                          WPF 276
B                                   extensibility 315                  brownfield project 32
                                    features as defects 147              backlogs of defects 135
backing tests 184                   folder structure 45                  bugs 34
backlog 143                         foundation 83                        challenges 13, 24
base class 179                      friction 10, 44                         technical 14
BaseRepository 301                  full-fledged 7                       changing course 354
batch files 60                      functionality 181                    changing requirements 354
behaviors 176, 181, 183, 234        goals 174                            code preparation 50
  composition 181                   handling resistance 24               conciseness 150
BeyondCompare 36                    hand-rolled DAL 304                  continuous integration 81
bin folder 104                      incorrect tests 94                   conventions 76
black box test 92                   inheriting 1                         data access layer 309
bottlenecks 296, 314                inheriting an application 8          deadlines 354
                                                  INDEX                                               373

brownfield project (continued)      build process 54                     Castle MonoRail 289
  defect backlog 143                  automated 102                      Castle Windsor 47, 368
  defect list 59, 161                 code metrics 127                   change 21–25
  defect tracking 137, 160          build scripts 37, 72, 78–79,            cost savings 27
  defects as a project stage 139         101, 224                           fear of 85
  defects backlog 138                 adding to incrementally 68         changeability 119
  defects classification 152          automated 101, 103                 changeset 35
  defects review 139                  failing tests 104                  check-in 35–36
  development cycle 154               performance 130                       automated testing 53
  failed 356                          refactoring feedback 227              branching 41
  feedback loop 59                    software metrics 127, 129             broken build 63
                                      templates 77                          cancelling 50
  fixing defects 87
                                      verification 80                       changes 61
  friction 51
                                      verifying correctness 68              comments 36
  incremental changes 355             well-factored 80                      considerations 43
  inheriting 13                     build server 60–61, 63, 71              continuous integration 53
  joining 23, 37, 56, 139–140         build files 68                        creating 74
  layering 228                        build process 72                      dance 39, 51, 55
  political and social aspects 14     environmental issues 61               first time 48, 50
  politics 16, 24                     performance 61                        frequency 40, 53, 62, 65, 364
  preexisting issues 156              stable state 60                          limited by ecosystem 54
  refactoring 222                     third-party installations 61, 65      latest version 65
  release notes 163                 built 112                               limit size 53
  review meetings 358               bulk accessor 351                       local vs. server errors 63
  reviewing for defects 135         business domain 219                     minimizing conflicts 66
  rewriting 13                      business layer 71, 303                  multiple 40
  rewriting summaries 150             data access layer 312                 rhythm 66
  roadblocks 354                    business logic 8, 170, 224, 260,        slow-running tests 80
  size factor 117                        263, 266, 279, 293, 301–304        trigger 132
  starting 353                        centralization 301, 304               verification 50
  static code analysis 118            domain-centric approach 220           version-merging VCS 52
  trending data 161                   refactoring 301                       walkthrough 64
  version control 32, 55              tiers 205–206                      check-in dance 62, 358
  Zero Defect Count 156               user interface 264                    final step 79
  See also brownfield               business logic layer 122, 220           local build 63–64
     applications                     multiple UIs 206                      rhythm 65
                                    business logic tier 213                 updating 56
brownfield test suite
                                      logical layer 206                     with continuous
  brittleness 102
                                    business requirements                      integration 61
  selecting tests 102                    95, 97, 99                      Chrome 111
bugs 6–7, 18, 84–89, 356            business rules 121, 206, 310         CI process 114
  adaptability 178
                                                                            test project 104
  feedback loop 60
                                    C                                    CI server 102, 130
  finding 87                                                             CI software 103
  fixing 87                         C# 69, 172                           CI. See continuous integration
  introducing 87                      optional parameters 346            circular dependencies 348
  recurring 363                     CAB. See Composite Application       class coupling 117–118,
build artifacts 76, 78                    Block                                127, 129
build components 77–78              cache 302                               afferent 121
build files 46                        invalidating 313                      efferent 121, 123
  updating 68                       caching 296, 313–314                    types 121
build machine 62                      enabling/disabling 319             class diagram 300
build number 69                     call stack 309                       class explosion 244
build person antipattern 72         Cassini 96                           class instance 234
374                                           INDEX



click event 263, 267               tracer bullets 128              comfort zone 149
client 192                         See also metrics                command separation 302
   confidence 19, 89             code navigation 244               comments 214
   involvement 19–20, 94,        code profiling tools 369          commit 35
      146–148                    Code Query Language 132             atomic 48
   morale 19                     code rage 293                     Common Language
   needs 141                     code reuse 300                         Runtime 216
client expectations 12           code reviews 358                  common metrics 116
client proxy 146                 code smell, ignored tests 95      Common Service Locator
client team                      code spikes 41                         252, 339
   reporting defects 136         code statistics 116               communication 19, 42, 65,
client-server architecture 205     coverage 118                         149–150, 161, 192, 196
CLR. See Common Language         code volatility 152                 defect related frustration 137
      Runtime                    codebases 5                         defect resolution 143, 155
coarse-grained                     active development 105            face-to-face 362
   remote facade 351               adding new tests 104              management morale 20
code                               apply automated testing 94        problems 17, 23
   -abilities 174                  brittleness 85                    through specifications 94
   compartmentalization 264        brownfield application 20       community, looking beyond 369
code analysis 116, 131             brownfield codebase 6           compartmentalization 264
   definition 117                  confidence 103                  compilation 71
   dynamic 117                     contaminated 8                    automated 68
   implementing 129                fixing code 9                     command line 64
code artificats                    future direction 90               configuration errors 63
   noncode artifacts 50            large codebases 13, 63,           continuous integration 69
                                      87, 249                        failure 57–58
code churn 152
                                   legacy codebase 6                 in NAnt 69
code conflicts 38
                                   object-oriented principles 19     local vs. server 63
code contamination 34
                                   quality 258                       outside Visual Studio 70
code contract 299
                                   rewriting 13                      speed 63
code correctness
                                   small 85                        compile in isolation 95
   confidence 119
                                   technical complexity 25         compile target 131
   lines of code 126                                               compile-time
                                   undesirable traits 97
code coverage 117–119            code-behind 170, 203, 219, 260,        dependencies 327–328
   automating 129                     282, 292                       object-relational mappers 339
   awareness 131                   segmenting 211                  complacency 360
   command-line utility 130        service class 204               completeness 21, 240, 300, 313
   limit 126–127                 code-generation engine. See         lazy loading 319
   statistics 100                     generation engine            complexity 243
   tools 47, 119                 code-generation tools 126           hiding 345
   unit tests 119, 127           CodeRush 184, 244, 367              reducing with a façade 350
   why separate 131              CodeSmith 133, 318                Component Object Model
code fragility 152               coding cycle 25                     wrapping 346
code generation 133, 295, 317    coding practices 122              Composite Application
   extensibility 318             coding standards 133                   Block 261
   maintainability 318           cohesion 122, 189                 composition 179–181, 237
   third-party tools 305, 317    cohesive application 184            favoring over inheritance 189
code generator 317               cohesiveness 243, 311             compression utility 36
code integration 51              collaboration 362                 compromise 154
code maturity 5                  collective code ownership         concerns 181
code metrics 59, 358                  18, 144–145                    encapsulating 218
   automation 133                  reacting to defects 145           vertical 213, 221
   integrating 132               COM. See Component Object         concrete classes 122, 193
   over dependence 126                Model                        concrete dependencies 238
   tool 128                      COM+ 346                          concurrency 39
                                                INDEX                                             375

conditional checks 120               slow tests 73                    D
confidence 293                       slow-running tests 110
  automated tests 304                software metrics 132             daily scrum 362
  increasing 365                     three-step process 67            daily standup meeting 157
  layering 336                       tools 368                        DAL. See data access layers
ConfigDictionaryLoader 243           tweaking 79                      data access 171, 295–297
configuration file 108, 322          versioning 69                      affecting UI 293
  artifact 76                        working code definition 66         anticorruption layer 299
connection                         contracts 207–208, 211, 221, 229     artifacts 322
  See connection strings           control flow 237                     assembly 348
connection objects 305                                                  class 6, 199, 205, 286
                                   Controller 110
connection strings 171, 322                                             confidence in 293
                                   Conway, Damian 174
connectivity 35                                                         coupling 294
                                   corporate DAL 317
consistency 15, 49, 51                                                  friction 293
constructor chaining 249, 257      corporate policy 321                 generic class 300
  final couplings 251              corruption 325                       impact of change 294
constructor injection                anticorruption layer 329           isolating 291, 294
     246, 248, 256                 cost of change 177                   layer 167, 290
constructor, overloading 249       cost savings 27                      maintenance issues 293
consumer 207                       cost-benefit ratio 9                 methods 198
  contract 208                     Coupland, Douglas 263                operations 307
consuming code 194                 coupling 217, 227, 234, 243,         options 291
containers 250                          253, 294, 298                   refactoring 291, 297, 299
contamination 4, 24, 83, 99, 189     code-behind 263                    repetitive 314
  levels 6–7                         decoupled design 336               single entry point 299
content management system 46         dependency coupling 253            tools 306, 368
continual learning 196               presenter 275                    data access layers 11, 112, 118,
continuous improvement 21            reducing 240                          122, 202, 205–207, 357
continuous integration 6, 9,         residue 250                        application-specific 316
     54, 60–62, 95, 116, 354,        SpellChecker class 249             caching 313–314
     356, 359                        third-party libraries 344          code generation 317
  adding tests 96                  coupling statistics 121              configuring 321
  adding UI testing 111            CQL. See Code Query Language         connection objects 306
  architectural change 80          cross-cutting concerns               coupled to UI 295
  automated build 56, 58                217–218, 228                    creating 321
  benefits 81                      CRUD 295, 297–300, 307               DataSets 295
  compilation 64, 69                                                    defects 317
                                   CruiseControl.NET 69, 129,
  core techniques 57                                                    dependencies 300
                                        367–368
  defect tracking 137                                                   deployment issues 321
                                   csc.exe compiler 70
  evaluating ecosystem 81                                               dirty tracking 310
  implementing 68                  culture 63–65                        domain-centric
  labeling and tagging 80            coding practices 195                  implementation 220
  latest version 64                  collective ownership 144, 153,     encapsulation 294, 305
  local build 63                        158, 160–161                    entry point 310
  long-running tests 79              quality 142, 144, 153–154          features 304–305, 315
  manually triggered 67              shift 58                           hand-rolled 304, 306, 316
  metronome effect 65                Zero Defect Count                  implementation methods 315
  notification 64                       156–157, 164                    integration tests 298
  pain points 57                   custom wrapper 251                   isolated 294
  performance 130                  CVS 49                               lazy loading 311
  project life cycle 76            cyclomatic complexity                logging 213
  queuing 80                            117–121, 129                    mocking out 300
  scheduled 132                      applied to maintainability         new vs. existing 315
  server 62, 81                         index 126                       object-relational mappers 339
  setting up 56                      factors increasing 120             options for creating 316
376                                             INDEX



data access layers (continued)     DBA. See database administrator   defect work 158
  pain points 292                  DDD. See domain-driven design     defect-tracking system 363
  patterns 291                     DDL. See data definition          deferred 153
  persistence ignorance 307             language                     details 138, 150
  refactoring 309                  Death by 1000 Quick               developer workflow 156
  SRP and 301                           Questions 303                difference with features 147
  strategies 317                   debugging 87                      difficult-to-reproduce 142
  testing 108                      decorator 189                     distinguishing from feature
  tips on updating 314             decorator pattern 188–189,           requests 139
  tools 304                             237, 351                     documenting 142
  transaction management 305       decoupling 183, 193, 211, 253,    duplicate 137, 146, 153
  transactional 306                     255, 258                     during triage 141
  two 315                          defect list 143                   en masse analysis 140
  unit of work 305                 defect resolution 5               error message detail 151
  versioning the database 322      defect tracking 137, 159–162      existing 143, 148
data access strategy 7, 365          confidence 136                  expected behaviour 151
Data Access wedge 222                configuration 164               exposed by tests 87–88
data binding 352                     faults 136                      falsity 145
  built in 280                       issue analysis 160              feature requests 137–138
  custom objects 278                 killer system 159               feedback loop 59
data definition language 113         pain points 137                 fixed 137
data filter 303                      release notes 163               fixing 87, 140, 144, 147,
data integrity 305                   trends 161                         155, 158
data layer 71                      defect tracking system 33, 128    freshness 138
data migrations 133                  defects management 138          friction 135
data persistence 291                 reporting 163                   futility 150
data repository 202                defect triage 142                 ghost defects 138
data retrieval 199                 defect-resolution task 144        historical 140, 159
data storage format 199            defects 16, 36, 42, 150, 356      ideal defect 149
data storage repository 205          accurate work 138               identifying pain points 136
Data Transfer Object 265, 270        aggregated view 161             immediate response 156
data transfer object pattern 351     ambiguity 150–151               inaction 151
data translation services 221        analysis 140, 142, 144, 254     incomplete 137
data volatility 314                  anatomy 135, 149–153            incorrect 145
database 108, 112–114                backlog 135–136, 142–143        information 138, 142
  errors 295                         becoming stale 139              inheriting 140
database administrator 292, 303      candidates for closing 154      initial review 141
database artifact 76                 categorizing 162                interest 138
database caching 296                 clarity 142, 149, 151           introducing 254
database connections 295, 305        classifications 152–153         knowledge about 136
  management 296                     client discovery 88             languishing entries 137, 139
  reusing 306                        client response 159             life 151–156
database lookup 282                  closed 142                      list scanning 150
database server 206                  closing 141, 153                log entries 151
database transactions 305            commitment to quality 155       logged defect 149
  management 296                     completeness 142, 149–150       logging 160
database versioning 322              context 149                     long-term use 152
DataCollector 171                    correctness 153, 164            maintaining momentum 144
DataSets 204–205, 219, 278,          cost of 88–89                   managing 135–136, 138, 159
     280, 331                        debt 155                        manual reproduction 84
  brownfield applications 334        decision 151                    misinterpretations 141
  conversion to objects 334          defect count 162                module tracking 152, 162
  converting back to 350             defect entry 138                morale 158
  removing 295                       defect reports 142, 145,        nonreproducible
DataTable 205                           150, 152                        138, 146, 153
                                                INDEX                                            377

defects (continued)                 trending 132, 161                  assembler object 248
  number 140                        triaging 139, 141, 159             constructor chaining 249
  observed behaviour 151            types 137                          constructor vs. setter 248
  open 139, 156, 158                unknowingly fixed 146              implementing 229, 248
  open list 155                     unresolved 136                     inversion of control 246
  overall quality 137               valid defect 141                   passive view 269
  overanalyzing 140                 verification 258                   ready for use 248
  pain points 135                   vs. features 145–146, 148          refactoring 255
  parallel resolution 142, 144      workarounds 85                     strategy 249
  pass-offs 158                     working context 156                tools 368
  per module 162                    workload 140, 150                dependency inversion
  perception 155                    Zero Defect Count 155                 principle 192, 196, 229,
  per-defect resource costt 159   defects tracking                        243, 245, 253–254
  point of failure 153              process 135–136, 139               abstraction 236
  policy 137                        reporting 163                      applying 256
  preventing 89, 197                tool 136                           benefits 258
  prioritization 147–148          defect-tracking systems 33, 128,     concrete implementation 192
  project based need 152               146, 149                        inversion of control 237
  project managers 159              back-filling 163                   mock objects 244
  quality 135                       defect data 161                    refactoring to 196
  rate of change 162                defects management 138             sample 237
  reacting to 145                   implementing 160                   testing 242
  recurring 87, 89                  reporting 160, 163               dependency matrix 123
  regression 89                   delays, effects of 15              deployable releases 67, 73
  removed functionality 146       delegates 187                      deployment 14, 73–76
  replicating 159                 deliverable 74                       needs 71
  reporting 161–162               delivery success 18                  practice for production 75, 96
  reports for code analysis 118   delta metric 125                     process 322
  reproducing 141–142, 151        dependencies 118, 124, 167,          strategy 80
  researching 142                      183, 244, 253, 269–270        depth of inheritance 117, 129
  resolution 143–144,               abstractions 237                   metric 172
     156–157, 164                   breaking apart 235, 244            tree 125
  resolution speed 258              breaking out 184                 design 56, 107
  resolution success rate 152       concrete 237                       domain-driven 221–222
  resolving backlog 144             confidence 254                     isolation 224
  responsibility 144                decoupling 254, 258                layering 110
  reviewing 159                     dependency injection 245         design patterns 178, 348, 351
  ridding of assigned 153           explicit 247                       decorator 188
  risk 149, 155                     external 184                       naming 189
  scheduling 142                    inheritance 240                    open/closed principle 187
  scope and schedule 139            intimate knowledge 234             strategy 178, 187
  screenshots 151                   inverting 243, 254–256             template method 188
  severity 152                      ISpellCheckDictionary 240          See also patterns
  software 160                      mock frameworks 245              design principles 195
  spreadsheet 153                   naming 235                         refactoring as you go 197
  spurious defects 145–146          optional 248                     design tool 107
  stack trace 151                   problems 229                     developer task list 156
  staleness 142, 150                reducing 240, 275                development
  status 138                        refactoring 240, 254               costs 259
  summaries 150                     removing 254                       environment 45, 77, 367
  team efficiency 152               required 248                       lifecycle 5
  tooling 159                       separating 184                     performance 367
  tracer bullet 128               dependency graphs 348                projects 2
  tracking 139                    dependency injection 15, 118,        task 38
  tracking systems 159                 237, 245, 247, 270, 357         See also friction
378                                             INDEX



development team 18, 27, 60,      don’t repeat yourself              environment templates 77
     75, 118, 127, 205, 321            200, 209, 297                 environmental issues 61
  assigning defects 141           dotTrace 369                       error checking 213
  balancing 12                    downtime, minimizing 332           error messages 7
  capabilities 356                drag and drop 260                  estimating 148
  compilation errors 59           DRY. See don’t repeat yourself     Evans, Eric 175, 220
  compromise 155                  DSL. See domain-specific           Event Aggregator 285
  confidence 87                        language                      event handling 273–274
  continuous integration 81       DTOs. See data transfer object     events 274–275, 285
  defect analysis 143             duplicate entries 138              exact implementation 237
  defect backlog 142              duplication 179, 200,              Excel.Workbooks
  defects 138, 141                     295–296, 315                    Open method 346
  dynamics 356                      avoiding 342                     execution paths 293
  existing members 17               removing 360                       frictionless 79
  expectations 355                duplication in code 133              testing separately 97
  fixing defects 158              dynamic code analysis 117          existing code, testing 105, 107
  realistic expectations 12         levels 119                       existing codebase 4–5
  role without tests 85                                              existing tests 94
  testing 253                     E                                    isolation 95
                                                                       reintegrating 102
  Zero Defect Count 140
                                  early success 363                  expectations 12, 97–98, 147
DevExpress 184
                                  ecosystem 13, 29, 117, 165, 167,     confidence 99
DI. See dependency injection
                                        223–224, 354                   defects 140
dictionaries
                                     automated testing 82              minimum 99
  creating 239
                                     improving 9                       setting 356, 366
  dependencies 240                                                   expected functionality 145
  embedded 253                       recommendations 55
                                  edge cases 318                     extensibility 176, 186, 189, 231,
dictionary objects 239                                                    244, 315
                                  edit-merge-commit 39–40, 65
DictionaryFactory 243                                                  flexibility 187
                                     method 38
DictionaryLoaderFactory 243                                            open to 185
                                  efferent coupling 121, 123,
DIP. See dependency inversion                                        extension methods 122
                                        233, 239
     principle                                                       external dependencies
                                     Automated Tests wedge 222
direct project references 47                                              211, 325–330
                                     instability 124
dirty tracking 310–311            encapsulation 170–171, 190,          abstracting 329
discoverability 278                     202, 214, 240                  anticorruption layer 330, 340
distributed software system 205      adaptability 178                  design patterns for 348
DIT. See depth of inheritance,       anticorruption effect 211         internal dependencies as 348
     tree                            cross-cutting concerns 217        minimizing risk 334
Docu 133                             examples of 208, 342              reasons not to abstract 339
documentation                        flaws 305                       external libraries 44
  generating 133                     usage example 346               external systems 168
  specifications 94                  vertical layers 213               methods for handling 329
  tests 90                           WCF service 341                   risk management 337
DocumentPosition 239–240          end goal 255                       Extract to Method 9
domain 264–265, 270, 275          end user involvement 19
domain layer 220                  end-to-end basis 108               F
Domain Model 276                  English
domain model 295                     Canadian 233                    Façade pattern 178–179, 350
  object 274                         U.S. 233                        façade pattern 181
domain transfer object 274        English dictionary                    complexity 345
domain-centric approach              loading 243                        third-party grids and 351
     220, 228, 264                EnglishDictionary 233, 239         factories 221–222
domain-driven design 218, 220,       implementation class 236        failed build 60
     310–311                      EnglishLanguageParser 171          failing tests 63, 88, 103, 298, 364
domain-specific language 251      enthusiasm 23, 353                 fake dictionary 242
                                                INDEX                                           379

fake objects 244                      release archive 78            Global class 122
   updating 245                       rigid 78                      global ignore pattern 49
fakes. See mock objects               sample 46, 76                   updating 50
FakeSpellCheckDictionary              solution file location 47     Google Chrome 326
      244–245                         sql folder 77                 go-to guy. See Hero Programmer
false defects 145                     tags 49                            Syndrome
fast tests 101                     Force of Will 276                granularity 242
Feathers, Michael 8, 184, 212,     form layout 9                    greenfield applications
      223, 362                     Fowler, Martin 58, 175, 177,          4–5, 10, 34
feature per check-in                     267, 272, 351, 362           initial stages 9
      antipattern 66               fragility 233                      integration tests 109
feature requests 138               framework builder anxiety 176      Model-View-Controller 289
features as defects 138            Freeman, Eric and                greenfield projects 51, 56, 366
feedback loop 56, 59, 72                 Elisabeth 351                baggage 14
   defect catching 88              friction 11, 27, 36, 40, 293     grid control 210–211
   fail fast 60, 64                   adding a test suite 96        grid object 211
   increase the speed 78              central development           GridView 282
   introducing new bugs 68               database 111               groupings 302
   slow tests 73                      confidence in development     guarantees 192
   testing 89                            team 19                    GUI. See user interface
Fiddler2 369                          development
file history 35, 47                      environment 244            H
   comparing file versions 36         eliminating 359
file locking 37–39, 51                existing test volatility 95   Halstead Volume 126
file management 37                    file locking 39               handing resistance 24
file structure 101                    identifying 10                hand-rolled DAL 316–318
file system 35–36                     long-running automated        hardcoding, dangers of 326
file versions                            build 130                  hash table 252
   comparing 36                       long-running tests            Head First Design Patterns
file-locking model 37, 55                79, 101, 110                    178, 351
   advantage 38                       maintenance 254               Hero Programmer
   when to use 40                     metronome 67                       Syndrome 18, 147
fine grained 351                      missing reference 62          hidden gem 315
Firefox 111                           new language features 187     hierarchy 248
FitNesse 109                          raising events 275            hieroglyphics 187
fixed defects 137                     reducing 36, 51               highly coupled code 229
fixtures 241                          responding to 11              historical biases 5
flexibility 237, 264                  starting fresh 43             hot fixes 322
fluent interfaces 93, 175, 251        third-party libraries 328     House of Cards 276
   nonfluent purposes 176             version control 55, 57        HPS. See Hero Programmer Syn-
Fluent NHibernate 308, 368         Front Controller 287                  drome
folder naming convention 36        functional interactions 237      HTML 266
folder structure 44, 60, 71        future-proofing 199              HTTP Handlers 289
   application source code 46      FxCop 133                        Hudson 69
   branches 48                                                      Hunt, Andrew 200
   brownfield conventions 76       G
   configuration files 46                                           I
   deployment question 47          Gang of Four 351
   external libraries 45           gap 207                          iBATIS 320
   flexible and reliable 78        generation engine                IDEs 175
   ideal 48                          custom 318                     IDictionaryLoader 243
   initial creation technique 49   generic data access 300–301      IglooCoder Commons
   labels 49                       ghost defects 138                     WcfNHibernate 368
   local vis-à-vis in VCS 48       Git 369                          ignored tests 94–95, 357
380                                                INDEX



IIS. See Internet Information        interceptor 218                     isolation 207–208, 212, 258,
      Server                         interface-based design 192, 207,          265–266, 294
impact of change 194, 294                 210–211, 228                      aspect-oriented
implementation details 171             brownfield scenarios 193                programming 215
improvement 4, 7                       seams 213                            data access layer 300
incomplete entries 138               interfaces 122–123, 229,               dependency inversion 243
inconsistency 357                         255, 300                          existing code 106
                                       abstractions 192                     interface-based design 193
incorrect tests 97
                                       coding to 189                        limits of 337
incremental approach 297
                                       concrete implementation 193          principle of least
incremental improvement                                                        knowledge 191
      294, 335                         contracts 193, 208
                                       EnglishDictionary 237                refactoring to layers 226
indirection 352                                                             reversibility 304
                                       interface-based design 193
infrastructure 9, 26, 207, 267                                              Supervising Controller 280
                                       isolated refactorings 194
   ignoring 199                                                             testing in 243, 253
                                       ISpellCheckDictionary 239
   refactoring 295                                                       ISpellCheckDictionary
                                       layer boundaries 209
   testing 176                                                                 238, 245–246, 250
                                       mock objects 245
inheritance 171–172, 179–180,                                               EnglishDictionary 246, 251
                                     internal dependencies 348
      239, 318                                                           iterative refactoring 337
                                     internal variables 276
   composition 181                   internally developed libraries 47
   hierarchy 125                     Internet Explorer 111               J
   polymorphism 173                  Internet Information Server 96
   ripple effect 179                                                     JavaScript 110, 266
                                     intimate knowledge 234, 247
   tree 172, 179                                                            hacks 327
                                     Introduce Variable 9
inherited tests 102                                                      JetBrains 184
                                     introducing incrementally 340          TeamCity 129
inheriting an application 8          invalid tests 95, 97                joins 302
inserts 302                          inversion of control 15, 174,       JPod 263
instability 123                           229, 237, 245, 358             JsUnit 111
integrating code 57                    configuration 251, 257
integration 56                         containers 212, 221, 249–250,
                                          254, 329                       K
   compile-time 328
integration lapse 62                      anticorruption layer 339
                                                                         KDiff3 369
integration server 82                     third-party vs. hand           keep it simple stupid 198
   See also build server                       rolled 252
                                                                         KISS. See keep it simple stupid
integration tests 10, 87–89, 184,      control flow 237
      223, 304, 315, 336               dependency injection 246
                                       dependency inversion              L
   automated 298
                                          principle 237
   confidence 108                                                        labeling 35, 53
                                       SpellCheckReviewService 247
   process 112                                                              strategy 54–55
                                       testing 229
   retrofitting 89, 109                                                  labeling and tagging strategy
                                       tools 368                               66, 80
   separate folders 100              IoC containers 47
   separate test project 101                                             lambdas 187
                                       Common Service Locator 252        Lampson, Butler 352
intent-revealing naming 347            configuring 257                   languishing entries 137
interaction testing                    dependency injection 251          Law of Demeter. See principle of
   seams 98                            See also inversion of control           least knowledge
interaction tests 92–93, 212, 242    IoC. See inversion of control       layering 98, 106, 110, 167, 174,
   code correctness 94               IRepository 301                           202, 357
   configuring 98                    Iron Triangle metaphor 11–12           fragile 363
interaction-based test. See inter-   IsAdmin 10                             incremental 294
      action tests                   IsCorrect method 242, 245              logical 206
interactions 266                     IsDirty 310                            maintainability and 346
interception 218                       setting 311                          need for 347
                                               INDEX                                           381

layering (continued)             Logging attribute 215              management 16, 296–297
   OO fundamentals 228           logging frameworks 47                change 21
   reducing risk 329             LoggingAttribute class 216           connection object 306
   repairing 203                 logical layering 222                 morale 20
   separation of concerns 205      anticorruption effect 211          release 323
   single seam 225               logical layers 71, 98, 102, 207      resolution 317
layers 122, 206–208, 229,          compilation 71                     rewarding the team 18
      277, 282                     horizontal 213                     tests 85
   adding 346                      interaction testing 212            unmanageable code 315
   anticorruption layer 209        interfaces 208                   management team 89
   design goals 218                rationale 294                      confidence 87
   domain-centric 221              refactoring 254                  managing risk 337
   examples 206                    seams 211, 213                   many-to-many relationships 319
   horizontal 213                long-running tests 79              Martin, Micah 179
   interdependencies 229         lower level of abstraction 172     Martin, Robert 236
   logical 291, 294              lunch ’n’ learn 196, 198           mass defect resolution 140
   refactoring direction 223                                        MbUnit 104, 368
   refactoring to 222            M                                  memory leak 117
   refining 225                                                     memory management 198
   replacing 209                 main sequence 124                  mentoring 197–198, 358
   reviewing 227                  graph 124                         Mercurial 369
   separating concerns 202       mainline 60                        merge conflicts 40
   vertical 213, 217, 221        maintainability 9, 13, 127, 167,   merge master antipattern 36
   volatility within 209             176, 301, 356, 359             merging
   vs. tiers 205                  anticorruption layer 339            check-in frequency 66
lazy initialization 312–313       class coupling 121                  misconceptions 53
lazy loading 298, 311–313         clutter and noise 214             message queue 275
   brownfield applications 319    code generation 318               metadata 342
   enabling/disabling 319         cohesion 122
                                                                    method naming 175
leaky abstraction 295, 312        cost 259
   data access 306                                                  metric reports 128
                                  cyclomatic complexity 120
learning company 146                                                metrics 116
                                  dependency inversion 238
learning curve 360                                                    automating 131
                                  façade 351
learning project 146              ISpellCheckDictionary 239           generation
legacy applications 4–6, 8        lines of code 126                      tools 368
Legacy Code Dilemma 184           long-term 322                       monitoring 132
legacy project 51                 object graph 334                    performance 314
liabilities 155                   over-complicated code 198           static analysis 152
lib folder 47                     refining layers 225                 using in combination 125
license files 45                  reversibility 176                 metronome 65, 73
lines of code 117–118, 129        single responsibility             microelectronics 176
   antipattern 126                   principle 184                  MicroSerfs 263
LLBLGen Pro 47, 320               testability 257                   Microsoft
load testing 299                  why important 174                   datasets 220
LOC. See lines of code           Maintainability Index 118            Enterprise Library 217
local build 63                   maintainability index                tiers 205
local source tree 78              formula 125                       Microsoft Indexing Service 326
localization string              maintenance 112, 174               Microsoft Installer 74
      management 264              invalid tests 100                 Microsoft Message Queue 340
lock-edit-commit 37, 51           mode 5, 8, 84                     Microsoft Office
log4net 368                      maintenance team 25                  façades and 351
logging 7, 206, 214–217,          defects 146                       Microsoft Office API 346
      221, 228                   making time 361                    Microsoft Visual Studio Team
   configuration template 77     Managed Extensibility                   System for Database
   tools 368                         Framework 261                       Professionals 113
382                                           INDEX



Microsoft Word                   MVP. See Model-View-Presenter      numeric prioritization 148
  layering 347                   MVVM. See Model View View-         NUnit 91, 103–104, 131,
middleware 206                      Model                               190, 368
migrations 114                   MyGeneration 133, 318                automated tests 73
Migrator.NET 322                                                    NUnitForms 111, 264, 266
missed functionality 16          N
missing assemblies 33                                               O
missing references 32–33, 62     namespacing 71
misspelling 235                  naming 272                         object graphs 309, 334
mobile devices 263                  multiple responsibilities 235     complex 310
mock objects 92–93, 210, 212,       renaming 239                    object interaction. See
     258, 274, 286, 300          NAnt 47, 63, 71, 103–104,               interaction
  dependency inversion                 129–131                      object model 317
     principle 244                  Java 68                           CRUD 319
  hand-rolled 245                NAntContrib 368                    object relational mapper
mocking 175, 283                 navigation 244                          108, 113, 177
  frameworks 264, 274            NCover 47, 129–131                 object seams 212
mocking engine 210               NDbUnit 113                        object-oriented 167, 170–173
mocking frameworks 47, 92, 244   NDepend 47, 122, 124,                academia 195
mock-up 26                             128–129, 368                   books 179
model 264, 277                   .NET                                 dependency inversion
  interaction with view 266         abstraction 236                      principle 192, 236
Model View Presenter
                                    AOP frameworks 217                foundational
  multiple per page 286
                                    Base Class Library 172               components 169
  refactoring to 276
                                    Framework 271                     fundamentals 179, 200, 207
Model View ViewModel 276
                                    interfaces 209                       encapsulation 208
Model-View-Controller 110,
                                    object-relational mappers 320     inheritance 179
     167, 266–267, 287–289
                                    page-behind 260                   interface-based design 192
Model-View-Presenter 110, 167,
     267, 336, 354                  seams 212                         introducing 194, 198
  differences with Model-View-      toolbox 367                       isolation 369
     Controller 288                 versioning 69                     languages 169
modules 160, 181, 185            .NET 3.5 122, 129                    Law of Demeter 190
  abstractions 192               .NET applications                    open/closed principle 185
  hierarchy 236                     code coverage 129                 over-complicating 198
momentum 38                         hand-rolled DALs 316              poor design 169
monolithic 243, 253              .NET Framework 173                      practices 360
MonoRail 288                        abstraction 186                   principles 169, 174, 179
Moq 47, 244, 368                    DataSets 295                      real-world problems 194
morale 356                          migrating 178                     separation of concerns 181
  client 18                         separating code 215               single responsibility
  defect resolution 144          network topology 198                    principle 181
  management 20                  new features 142                     taking full advantage 169
  team 17                           iterations 144                    teaching 197
MovieReviewService                  trial and error 362             object-oriented principles
     232–236, 239                new languages                           19, 364
  logic 240                         French 233                        reducing risk 329
MSBuild 69, 71, 129                 implementation 233              Object-Relational Mapper 22
MSDN Framework                   newsgroups 14                      object-relational mappers
     Guidelines 237              NHibernate 47, 308, 320, 368            11, 47, 168, 295, 329
MSI. See Microsoft Installer     NHibernate Profiler 368              anticorruption layers 339
MSMQ. See Microsoft Message      Nilsson, Jimmy 220                   infrastructure 296
     Queuing                     noise 215                            maintainability 321
multilanguage support 252        noise and clutter 214–215            mapping file 308
multitier 206                    n-tier architecture 220              persistence by
MVC. See Model-View-Controller   number of classes 117                   reachability 310
                                                   INDEX                                               383

object-relational mapping              defect tracking 136                persistence ignorance 307, 309
  third-party tools 305                defining testing unit 90           physical layer 71
objects 171                            definition 9                       physical tiers
  as return type 334                   dependencies 229                     logical layers 206
  behavior 172                         development process 10               refactoring 222
  converting to DataSets 350           eliminating pain 359               planned outage 328
  creation 250                         external dependencies 326          points of failure 235
  dependencies 250                     hand-rolled mocks 93                 identifying 87
  factory class 252                    identifying 10, 27, 136            Policy Injection Block 217
  hierarchy 190                        layering 203, 205                  political factors 15
Obsolete attribute 335                 maintaining momentum 353           politics 157, 195
Occam's Razor 199                      manual build process 72              defects 139
OCP. See open/closed principle         object-oriented                    pollution 56
one-off search criteria 187               principles 194                    development machines 61
one-to-many relationships 319          reducing backlog of                polymorphism 171, 173
OnExecuted event pattern 218              defects 136                     poor man’s dependency
OnLoad event 331                       responding to 11                        injection 249, 255, 257, 337
  direct reference to web              third-party dependencies 43        PostSharp 217, 368
     service 336                       user interface 261                 PowerShell 37
  updated with proxy class 333       pair programming 197, 362            practices 5, 360
OO principles. See object-             refactoring 227                      challenging assumptions 11
     oriented principles             parser 231                             coding 6–7, 13
OO. See object-oriented              partial classes 318                    design 8
open defect counts 155               partial solution 15                    maintaining code 169
open source projects 42              Passive View 266–269                   quality 12
open/closed principle 176, 185,        event handling 273–274               software development 234
     187–189, 195, 258–259             implementation 271                   version control 9
Opera 111                              suitability 290                    prebuild command 96
optimization 198, 277                  testability 280                    Predicate class 186
optional parameters 346                view logic 270                     predicates 187
OR 303                                 vs. Model-View-                    predictive development 199
orderliness 205                           Controller 288                  premature optimization 198,
organic code growth 297                vs. Supervising Controller 271          296, 299, 311, 313–314, 319
ORM debacle 365                        when suitable 280                  PreRender 262
ORM. See Object Relational           paths. See execution paths           presentation
     Mapper                          pattern naming, dangers of 335         pattern 266
Osherove, Roy 90, 281                patterns 167                         Presentation Model
outdated tests 95                      components 277                          267, 275, 279
overlap period 332                     See also design patterns             suitability 290
                                     Patterns of Enterprise Application     vs. Model-View-
P                                         Architecture 178, 351                Controller 288
                                     Pavlov, Ivan 279                       WPF 276
Page_Load 262                        perceived functionality 146          presentation tier 206, 213
page-behind                          per-defect resource cost 159         presenter 268, 272, 277,
  method 260                         performance 296                           279, 336
pain points 9, 16, 27, 32, 34, 51,     issues 299                           creating 337
    57, 114, 360                       metrics 314                          dependencies 269
  automated testing 84                 optimizations 299                    dependency on view 270
  broken references 44               performance monitoring                 implementation 285
  build person 72                         213, 228                          responsibilities 286
  business logic 301                 periodical review 358                  test to create 283
  code correctness 84                Perl Best Practices 174                testing 280–281
  concurrency 36                     permutations 97                        view interface 284
  continuous integration 57          persistence by reachability          principle of least
  data access 292–293                     309–310                              knowledge 190–191
384                                          INDEX



prioritization 147–148         proxy pattern 333, 350                breaking existing tests 257
  collaborative 148              objective 335                       business logic 301
Prism 261, 275                 PSake 63                              CRUD 295, 297–298
procedural code 169–170        public interface                      cumulative 357
processes 5, 317                 changing 332                        dependency inversion 253
producer contract 208            updating 338                        domain-centric 219, 264
production code                public-facing API 330                 duplication 315
  branching 41                 public-facing methods 193             final 225
  maintaining 33               publish/subscribe                     flexibility 193
production environment           mechanism 274                       guidelines 198
     67, 77, 113                 model 261, 302                      incremental 223, 254, 294
production mode 5, 9, 15                                             infrastructure 297
production version             Q                                     internal libraries as
  bugs 41                                                               external 330
productivity 8, 34, 365        QA team 19, 85, 153                   introducing
  add-ins 49                   QA testing 19                            dependencies 282
  friction 44                  QA. See quality assurance             invalid test 95
  tools 175, 244, 367          quality 12, 21, 128                   iteration 359
profile retrieval 264            commitment 154–155                  iterative 337
profiling execution 296          culture 144                         large codebase 226
progress review 358                                                  large-scale 26
                                 defects 136
project                                                              limiting the effects 299
                                 failure 15
  direction 6                                                        logical layers 222
                                 review 146
  effecting change 20                                                maintainability 9
                               quality assurance 17, 19, 60
  full-fledged 5                                                     physical tiers 222
                               query separation 302
  incomplete 27
                               querying data 297                     principle introduction 197
  life cycle 59
                               queuing 80                            quicksand 304
  management 20
                                                                     reducing coupling 240
  prioritization process 148
                               R                                     sample 331, 335
  shelf life 25
                                                                     screen 266
  stresses 18
  technical complexity 25      RAD. See Rapid Application            starting 222
project folder 48–49                Development                      techniques reference 362
project manager 298            Rake 63                               testing 88
project quality 12             ramp-up time 320                      to logical layers 294
project references 44          Rapid Application                     tools 298
project sponsors 16                 Development 264                  transaction management 297
project state 5                readability 174–175, 198,             trial and error 362
project success 26                  299, 318                         vs. rewriting 13
project team 5                   class naming 235                  refactoring to layers 222–226
  defect resolution 143          clutter and noise 214             Refactoring: Improving the Design of
  feedback loop 60               cyclomatic complexity 120              Existing Code 362
  quality 155                    lines of code 126                 refactorings 9, 105
project visibility 15            method naming 182                   half-finished 15
proof of concept 26–27         readme file 32, 44, 51                technical 14
property naming 175            real dictionary 242                 reference errors 32
property setters 248           re-architecting 224                 references 285
PropertyMap 307                reasons to change 181               reflection 348
prototypes 26–27, 263          Red Gate 322                        registry settings 45
  for test 196                   SQL Toolkit 113                   regression errors 298, 321
  See also spikes              Refactor 244                        relayering 167, 228
proxies, benefit 350           refactoring 1, 13, 106, 118, 127,     duration 203
proxy class 333–336, 350            167, 202                       releasable application 67
proxy objects 313                as you go 197                     releasable package 73
  See also mock objects          as-needed basis 339               release notes 163
                                                 INDEX                                             385

releases 73–76                      risk 155, 222, 255, 325               MVC 290
   assembly per physical               assessing 338                      persistence ignorance 307
      location 71                      minimizing 337                     poor 214, 307, 309, 316
   automating 322                      open defects 159                   primitive 206
   controlling the source of 70        silo'd roles 145                sequencing 36
   production release 139           roles 264                          service configuration 264
   release notes 163                   silos 145                       service endpoint
   version retention 78             root folder                           configuration template 77
reliability 305                        solution file 47                service layer 305
Remote Façade pattern 351           routing 289                        service locators 221–222
remote proxy 350                    Ruby on Rails Migrations           setter injection 248
renaming 239                              113–114, 322                 setters 311
                                    runtime dependencies 328           Short Message Service 183
repeater, top-level 204
                                                                       shotgun effect 305
replaceability 119, 128
                                                                       Simian 133, 368
reporting tools 94                  S
                                                                       simplicity 350
repositories 300                                                       single parameter,
   domain-driven design 221         Safari 111
                                    safety net 223, 336                      constructor 234
   usage example 345                                                   single responsibility
   user interface 270               Sandcastle 133
                                                                             principle 40, 98–99,
repository contents 49              scalability 302
                                                                             182–183, 197, 246, 258,
request pipe 224                    scale 12
                                                                             261, 264, 266
research 356                        Scooter Software
                                                                          brownfield scenarios 184
ReSharper 184, 244, 367                Beyond Compare 36
                                                                          class count 243
resolution management 317           scope 12, 147
                                                                          data access and 301
resource blocking 39                screen logic 263                      definition 181
resources 12                        screens 263, 329                      encapsulation 218
                                       complexity 270                     poor 308
responsibilities 242–243, 264
                                       data transfer objects 351          refactoring to 253
   example 214
                                       flexibility 278                    violation 170, 344
   refactoring out 362
                                       login screen 271                skepticism 21, 158
   responsibility chain 243
                                       refactoring 278                    dealing with 361
   separation of 184, 205
                                       synchronization 275             slow tests 100–101
   single 258                          testing 330
   web services 342                                                    smell. See contamination
                                    screenshots 151                    SMS. See Short Message Service
retention policy 78                 scripting tool 71
RetrieveRecursiveDirectoryInfo                                         SoC. See separation of concerns
                                    seams 98, 207, 211, 277            social archetypes
      method 344                       beginning refactoring 222
reusable code 179                                                         overprotective DBA 303
                                       definition 226                  software artifact 38
reuse 4, 7                             design goal 218                 software delivery 19, 24, 26,
reverse diffs 35                       first seam 224                        59, 73
reversibility 22, 35, 96, 128,         refactoring 222, 224               impediments 9–10
      176–178, 209, 212             search criteria 300                software development 318
rewriting 13                        security checks 213                   continuous integration 58
Rhino Mocks 47, 92, 244, 368        Select 302                            fundamentals 202
   syntax 93                        Selenium 111, 264                     integration 56
rhythm 65, 73                       separation of concerns 205, 263,      process 36
ripple effect 121, 180, 209, 294,         270, 274, 280, 289, 304         team 146
      307, 309                         and single responsibility 308   software entities 185
   collections 191                     aspect-oriented                 software metrics 116, 118
   data structure 205                     programming 215                 abstractness 123
   inheritance 179                     data access 301                    automating 131
   intimate knowledge 234              definition 181                     build script 127
   maintenance problems 121            encapsulation 218                  class coupling 121, 129
   modifications 211                   good 305                           code churn 152
386                                            INDEX



software metrics (continued)      ”spring cleaning” 359              Supervising Controller
  cohesion 122                    Spring.NET 47                           267, 271–273, 336
  context 120                     spry. See agile practices            suitability 280–290
  continuous integration 132      spurious defects 145                 vs. Model-View-
  cyclomatic complexity           spurious entries 138                    Controller 288
     119, 129                     SQL 177, 298, 302–303                when suitable 280
  deltas 128                         duplication 297                 supplier 192, 207
  depth of inheritance 125, 129      dynamic vs. stored              synchronization 287
  draconian adherence 127               procedures 320               synchronous system 13
  feedback 227                       generation 319                  System.DBNull 305
  implementing 129                   hardcoded 292                   System.Exception 172
  instability 123                    infrastructure 296              System.IO 172
  intermittent execution 132         injection attacks 320           System.IO.Compression 172
  maintainability index           SQL Compare 322                    System.IO.Ports 172
     125, 129                     SQL Data Compare 133               System.Object 173
  setting thresholds 120          SQL injection 6                    System.Runtime.Remoting
  tracer bullets 128              SQL Packager 133                        namespace 217
  using as deltas 125             SQL queries 171                    System.Transaction 306
  when refactoring 227            SQLite 368                         System.Web.UI 279
  working code definition 66      SRP. See single responsibility     System.Web.UI.Control 172
Solution Explorer 70–71                 principle                    System.Web.UI.Controls 271
                                                                     System.Web.UI.Page 172
solution file 32, 44              stability 128
                                                                     System.Web.UI.UserControl
solution folder 43                stabilization period
                                                                          172
solution/project alignment 71           antipattern 157
                                                                     System.Web.UI.WebControls
source code repository 35, 45,    stack trace 151
                                                                          276
     58, 106                      stakeholder 15–16
                                                                     System.Windows.Forms
  check-in 67                     stale test suite 95                     271, 276, 279
source control system             state management 289
  repository 31                   state-based tests 90, 114
  See also version control           code correctness 94             T
source control, tools 369         static analysis, tool 118
                                                                     TableMap 307
source dictionary 242             static code analysis 117–118
                                                                     TAD. See test-after development
SourceSafe 37                     statistical analysis
                                                                     tagging. See labeling
Spanish dictionary                   implementing 129
                                                                     Tarantino 322
  loading 243                     statistical slavery 126            tasks 317
SpanishDictionary 233–234, 239    statistics 118, 127                TaskScheduler 171
specification-based tests 93      storage medium 291                 TDD. See test-driven design
specifications 93–94              stored procedures 177, 198,        team dynamics 18, 303, 356
SpellCheckDictionary 231–232,           283, 292                     Team Foundation Server 37
     235, 239                        containing business logic 301   team morale 15
  abstraction 236                    data retrieval 199              Team Suite
  base class 238                     deployment benefit 321             Code Metrics feature 129
  logic 240                          sample 293                      TeamCity 68–69, 129, 367–368
SpellChecker 246                     vs. dynamic SQL 320             technical challenges 14
  default constructor 239            vs. inline SQL statements 321   technical content 196
  IoC container 250               strategy 178, 187                  technical debt 6, 8, 15, 24, 39
  preparing for testing 242       strategy pattern 189                  development iterations 25
SpellChecker class 233            streamlined builds 56                 side effect 7
SpellCheckingService 235          stress, retesting 330                 time-boxing 25
SpellCheckReview 233–234          StringFunctions class 122          template method 188–189
SpellCheckReviewService 246       StructureMap 47, 368               templates 77
spikes 195–196                    StyleCop 133                          prebundled 317
  See also code spike             SubSonic 318                       test configuration 97
Spolsky, Joel 13                  Subversion 37, 49                  test environment 77
                                                INDEX                                          387

test execution friction 100         deleting tests 95                 new code 89, 107
test fixture 73                     dependency inversion              new tests 105
test for final intent 105              principle 240, 253, 257        no-test scenario 88
test naming                         design patterns 179               organizing 100
   intention revealing 91, 99       difficulty 189                    overhead 241
test project 94–96, 104             documentation 90                  point of failure 87
   root folders 101                 efferent coupling 222             prerelease 293
test projects 114                   events 274                        prerequisites 241
test review 242                     examining existing tests 94       prototypes 196
test runners 264                    execution paths 86, 97, 120       proxy objects 92
test server 70                      existing code 105, 281            quality 89
test team, defects 141                 pragmatism 106                 recurring defects 89
testability 197, 224, 240,          existing functionality 240        re-examining 102
      276, 300                      existing tests 94                 refactoring tests 95
   designing for 176                expectations 98, 103              regression 88, 105, 107,
   new points 257                   exposing defects 87–88               256, 258
   user interface 263               failing test 87–88                regression defects 86
testable design 336                 failure 73, 91                    regular 171
test-after development 107, 224     fake objects 244                  re-integrating existing
test-driven design 102, 107, 192,   feedback loop speed 89               tests 94, 96, 102
      224, 280, 284                 fixtures 241                      reproduction 86
   negative perception 16           full-test scenario 88             responsibility 243
test-driven development 360         higher level 109                  reviewing existing tests 97
TestDriven.Net 367                  human error 86                    revisiting 94
testers, defects 140                identifying untested code 119     safety net 104, 254
testing 6                           ignored tests 94–95               separating unit tests from
   absolving completeness 243       in isolation 108                     integration 100–101, 104,
   acceptance 73                    incorrect tests 94                   109–110
   acceptance tests 109             increasing confidence 85          setting expectations 93
   adding new feature 105           integration 286, 316, 321         setup 97
   adding new project 104           integration tests 10, 72, 98,     simplifying 244
   addressing existing tests 96        108, 184, 243, 253             single responsibility
   assemblies 101                      database installation 61          principle 242
   autogenerated database 112          separating from unit           slow tests 73, 100, 109–110
   automated 59, 67                         tests 100                 specification-based 93, 109
   automated build 58               interaction testing 84, 92, 98,   stale test suite 95
   automated tests 72                  212, 242                       state-based 97
   before refactoring 223           invalid tests 95                     system under test 90
   behaviors 241, 258               inversion of control 229          test after 109
   black box tests 92                  container 258                  test for modified
   brittleness 97, 102              irrelevant code 100                  functionality 106
   build script 102                 isolation 170, 176, 212, 243      testability 176
   business requirements 99         layering 106                      test-after development 107
   commented out tests 94           long term asset 253               third-party
   complex setup 98                 long-running tests 79                dependencies 208–209, 241
   comprehensive 86                 manual 59, 316                    types of 89
   confidence 89, 91, 103, 105      manual verification 84            unit tests 72, 109, 184, 253,
   context 92                       meaningful expectations 98           257, 354, 360
   correctness 97, 103              methods 90                        untestable 170, 176
   data dependency 112              mock objects 92, 108, 176         untested code 89, 105
   databases 79, 111, 114           mocking frameworks 93, 98         unused code 100
   DataSets 278                     multiple environments 75          user interface 73, 110, 264,
   defects 89                       multiple projects 101                277, 289
   definition of unit 90            naming 91                         vagueness 99
388                                               INDEX



testing (continued)                 The Pragmatic Programmer 200       trunk 42, 53
   validity 97, 103                 third-party add-ins 244              folder 48
   verification 88                  third-party components 44          Twilight Stars 2, 4, 331
   verifying desired                third-party containers 252         two-tiered architecture 205
      functionality 106             third-party dependencies           type resolution 251
   verifying output 90                    43–47, 208                   TypeMock 47, 244, 264
   volatility 94                       anticorruption layer 332–333
   web interface 111                   continuous integration          U
   working code definition 66             installation 61
   YAGNI 199                           dealing with changes to 209     UI testing 111
testing mode 5                         design patterns 348               frameworks 110
testing project. See test project      errant dependency 61            UI tests 73, 111
testing strategies 83                  ignore pattern 50               UIs
testing team 17, 59, 85                reliability 332                   layer 71, 224
   feedback loop 60                 third-party libraries 76             refactoring 223
   friction points 72                  complexity 345                    See also user interface
   reporting defects 136               usage example 343               Unit of Work pattern 306, 316
tests 7–8                              See also third-party            unit testing 83, 87
   automated 304, 337, 339                dependencies                   specifications 93
   automating 83                    third-party tools 239              unit tests 53, 221, 223, 284, 304
   black box tests 92               Thomas, David 200                    automated 167
   business value 95                three CC’s 118                       for new code 107
   client code 102                  three-step process 67, 72            incorrect tests 97
   code modifications 339              compiling the code 69             inherited 100
   comprehensive suite 117             deployable releases 73            metrics 119
   creating 105                        incremental introduction 68       not feasible 184
   creating before code 192                                              retrofitting 89
                                    three-tier architecture 206
   deleting 100                                                          reviewing 258
                                       traditional 207
   exposing bugs with 87                                                 separating
                                    tiers 205–207
   failing test 87                                                          responsibilities 184
                                       See also physical layer
   for new code 108                                                      SpellChecker class 241
                                    time factor 361
   granular level 9                                                      testing nonexistent code 192
   identifying 102                  time-boxing
                                                                         types 90
   importance of 87                    code spike 41
                                                                       unit-testing
   integration 298, 315, 336           meetings 358
                                                                         folders 101
   interaction tests 92             timeliness 21
                                                                         frameworks 41, 47, 104
   invalid test 95                  timestamps 36                        utility 129
   lack of 85                       TODO comments 315                  unstable code 35, 57–58, 60, 63
   naming 91                        tool availability 131              untestable code 107
   overspecifying 281               tools 367                          updates 302
   poor tests 98                    tools folder 104                   usability 198
   reason for 85                       difference with lib folder 47   useless code 127
   regression 84                    TortoiseSVN 37, 49, 369            user control 209
   segregating 101                  ToString method 173                  custom wrapper 211
   specification-based 93           traceability 163                     upgrading 210
   state-based 90                   Tracer bullets 128                 user groups 14
   sufficient 88                    tracking systems 153               user interface 167, 205, 260, 291
   to verify functionality 105      transaction management 306           binding 278
   types 89                         transactions 213                     business logic 279
   UI tests 111                     transition methods 175               components 264
   unit 300, 304                    translation layer 270                concerns 265
   validity 95                      transport mechanism 342              controller action 289
   writing a test 87                trend spotting 118                   coupling 263
text comparison tools 36            triage velocity 142                  data binding 280
The Art of Unit Testing 90          trial and error 362                  decoupling 285
                                                INDEX                                               389

user interface (continued)        V                                       required features 34
  eventing 273                                                            resource blocking 38
  existing behaviour 279          valid defect 141                        root level 48
  exposing controls 271           validation 206                          state 52
  front controller 287              layer 207                             state of code 81
  interaction 266                 validation logic 118                    tips 53
  interfacing the presenter 270   value holder 313                        unstable state 52
  isolation 280                   variables 175                           versions 35
  layers 277                      VBA. See Visual Basic for               See also version control
  model 264, 277                       Applications                    version management 317
  Model-View-Controller 287       vbc.exe 70                           version merging 37, 39–40
                                  VCS. See version control system         See also edit-merge-commit
  Model-View-Presenter 267
                                  version control 31                   version merging model
  monolithic 263–264
                                    advantages 34                            39–40, 55
  moving vs. rewriting code 281     branching 41, 304                  version number 69
  MVC vs. MVP 287                   friction 36, 51                    versioned code 51
  pain points 290                   latest version 36, 43, 52–53       versioning 69
  Passive View 268                  outdated view 66                      latest folder 78
  patterns 260, 266–267             pain points 32                     versioning issue 113
  preferences 280, 289              preparing code for 50              vertical concern 213
  Presentation Model 275            repository 56, 65                  vertical layers
  presenter 279                   version control system 9, 356           integrating 213
  presenter vs. controller 272      accessibility 35                   vertical slice 296
  refactoring 357                   adding files 48                    view 264, 266, 277
  refactoring example 282           branching 195                         communication with
  refactoring risk 277              changeset history 95                     presenter 274
  refactoring to patterns 276       characteristics 34                    components 278
  routing 289                       cleaner 354                           implementation 285
  screen-specific data              concurrency 36, 39, 51                presenter reference 284
      classes 265                   constraints 38                        responsibilities 286
  separating concerns 263           contents 49                        ViewState 289
  separation from business          defect tracking 137                virtual machines 61
      logic 261                     ease of use 37                     virtual methods 188
  separation of concerns            file management 37–40              Virtual PC 61
      260, 265                      files to exclude 49, 78            virtual proxy 312
  server-side controls 289          folder structure 48                virtualization 61
  single responsibility                efficient 337                   Visual Basic 69, 84
      principle 261, 264            greenfield applications 34         Visual Basic for Applications
  supervising controller 271        impact of broken build 63             Excel 346
  test runners 264                  implementing 43                    Visual Studio 9, 37, 48, 94, 239
                                    importance 52                         accessing code repository 49
  testability 281
                                    including external                    automation 63
  testing 263–264, 266–267,
                                       libraries 328                      code metrics 126
      270, 277, 279, 289
                                    integration 37                        code navigation 184
  tools 368                         interfaces 37                         feedback 59
  two-way binding 276               labeling and tagging                  first check-in 50
  validation 266–267                   strategy 66, 80                    navigation 244
  view 265, 279                     labels 54                             solution file 44
  view or controller first 288      lock-edit-commit. See lock-edit-      solution folders 77
  view-presenter references 285        commit                          Visual Studio 2008
  ViewState 289                     moving file location 47               Code Metrics feature 129
  widgets 279                       preventing check-ins 65            Visual Studio Team Developer
Utilities wedge 222                 process failure 52                    Code Metrics feature 129
Utility class 122                   project folders to exclude 49      Visual Studio’s Solution
utility functions 122               reducing friction 36                     Explorer 70
390                                             INDEX



VisualSVN 37, 369                    proxy pattern and 350           wrapper pattern 211
VMWare Workstation 61                refactoring 340                 wrapping
volatility 209                       runtime dependency 328            components 342
Voodoo 313                           wrapping 332                      technique 346
                                   web.config 10
W                                  WebForms, statefulness 288        X
                                   WebServiceDictionaryLoader
waterfall methodology 199              243                           Xcopy 74
WatiN 264, 266                     Wheeler, David 352                XML 16, 132, 199, 251
  See also Web Application         WHERE 302–303                       comments 133
     Testing in .NET               widgets 263, 279                    NAnt 68
Watir. See Web Application         Windows Communication               XPath 199
     Testing in Ruby                   Foundation 338, 340           xUnit 104
WCF service 340, 342               Windows Explorer 37
WCF. See Windows Communica-        Windows Forms 71, 111, 331        Y
     tion Foundation               Windows Presentation
Web Application Testing in             Foundation 275–276            YAGNI. See you ain’t gonna need
     .NET 111                      Windows Search 326                    it
Web Application Testing in         Windows Server 2008               you ain’t gonna need it
     Ruby 111                        upgrading to 326                    199, 239, 297, 307, 316
web controls 331                   WinForms 210, 260, 264, 271         pragmatism 200
web farm 314                         applications 261
web forms 292                      WinMerge 36                       Z
web services 100, 108, 122, 206,   workarounds 85, 155
     232, 327                      Working Effectively with Legacy   Zero Defect Count 135, 144,
  controls 334                         Code 8, 184, 212, 223, 362        156–162
  DataSet 331                      work-to-benefit ratio 82            policy 140, 155
  DataSets return type 334         WPF. See Windows Presentation     zero open defects 156
  delegating 342                       Foundation                    Zone of Pain 123, 125
  monolithic 253                   wrapper 209                       Zone of Uselessness 123, 125

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:48
posted:3/31/2011
language:English
pages:20