《重構-改善代碼既有的設計》英文目錄

  Chapter1:Refactoring,aFirstExample重構,第一個例子 

  TheStartingPoint起點 

  TheFirstStepinRefactoring重構第一步 

  DecomposingandRedistributingtheStatementMethod分解並重組slalemenl方法 

  ReplacingtheConditionalLogiconPriceCodewithPolymorphism用多態代替價格條件邏輯代碼 

  FinalThoughts結語

 

  Chapter2:PrinciplesinRefactoring重構原則 

  DefiningRefactoring何謂重構 

  WhyShouldYouRefactor?爲何重構 

  WhenShouldYouRefactor?何時重構 

  WhatDoITellMyManager?怎樣說服經理 

  ProblemswithRefactoring重構的問題 

  RefactoringandDesign重構與設計 

  RefactoringandPerformance重構與性能 

  WhereDidRefactoringComeFrom?重構的起源

 

  Chapter3:BadSmellsinCode(byKentBeckandMartinFowler)代碼壞昧 

  DuplicatedCode重複代碼 

  LongMethod過長方法 

  LargeClass過長類 

  LongParameterList過長參數列表 

  DivergentChange發散式變化 

  ShotgunSurgery霰彈式修改 

  FeatureEnvy特性依戀 

  DataClumps數據泥團 

  PrimitiveObsession基本類型偏執 

  SwitchStatementsswitch語句 

  ParallelInheritanceHierarchies平行繼承體系 

  LazyClass冗餘類 

  SpeculativeGenerality理論上的一般性 

  TemporaryField臨時字段 

  MessageChains消息鏈 

  MiddleMan中間人 

  InappropriateIntimacy過度親密 

  AlternativeClasseswithDifferentInterfaces接口不同的等效類

  IncompleteLibraryClass不完整的庫類 

  DataClass數據類 

  RefusedBequest拒絕繼承 

  Comments註釋過多

 

  Chapter4:BuildingTests構建測試 

  TheValueofSelf-testingCode自測試代碼的重要性 

  TheJUnitTestingFrameworkJunit測試框架 

  AddingMoreTests添加更多測試

 

  Chapter5:TowardaCatalogofRefactorings重構目錄 

  FormatoftheRefactorings重構描述的格式 

  FindingReferences尋找引用 

  HowMatureAreTheseRefactorings?這些重構的成熟度如何


  Chapter6:ComposingMethods組合方法 

  ExtractMethod提取方法 

  InlineMethod內聯方法 

  InlineTemp內聯臨時變量 

  *ReplaceTempwithQuery用查詢方法代替臨時變量 

  IntroduceExplainingVariable引入解釋性變量 

  SplitTemporaryVariable分離臨時變量 

  *RemoveAssignmentstoParameters去除參數賦值 

  ReplaceMethodwithMethodObject用方法對象代替方法 

  SubstituteAlgorithm替換算法 


  Chapter7:MovingFeaturesBetweenObjects在對象之間移動特性

  *MoveMethod移動方法 

  MoveField移動字段 

  ExtractClass提取類 

  InlineClass內聯類 

  HideDelegate隱藏委託類 

  RemoveMiddleMan去除中間人 

  IntroduceForeignMethod引入外加方法 

  *IntroduceLocalExtension引入本地擴展類 


  Chapter8:OrganizingData組織數據 

  SelfEncapsulateField自封裝字段 

  ReplaceDataValuewithObject用對象代替數據值 

  ChangeValuetoReference將值對象改爲引用對象 

  ChangeReferencetoValue將引用對象改爲值對象 

  ReplaceArraywithObject用對象代替數組 

  DuplicateObservedData重複被觀察數據 

  *ChangeUnidirectionalAssociationtoBidirectional將單向關聯改爲雙向 

  ChangeBidirectionalAssociationtoUnidirectional將雙向關聯改爲單向 

  *ReplaceMagicNumberwithSymbolicConstant用字面常量代替魔數 

  EncapsulateField封裝字段 

  EncapsulateCollection封裝集合 

  ReplaceRecordwithDataClass用數據類代替記錄 

  *ReplaceTypeCodewithClass用類代替類型碼 

  ReplaceTypeCodewithSubclasses用子類代替類型碼 

  ReplaceTypeCodewithState/Strategy用State/Strategy代替類型碼 

  ReplaceSubclasswithFields用字段代替子類

 

  Chapter9:SimplifyingConditionalExpressions簡化條件語句 

  DecomposeConditional分解條件語句 

  ConsolidateConditionalExpression合併條件語句 

  ConsolidateDuplicateConditionalFragments合併重複的條件片段 

  RemoveControlFlag去除控制標誌 

  ReplaceNestedConditionalwithGuardClauses用守衛語句代替嵌套條件語句 

  ReplaceConditionalwithPolymorphism用多態代替條件語句 

  IntroduceNullObject引入Null對象 

  IntroduceAssertion引入斷言 


  Chapter10:MakingMethodCallsSimpler簡化方法調用 

  RenameMethod重命名方法 

  AddParameter添加參數 

  RemoveParameter去除參數 

  SeparatequeryfromModifier將查詢方法與修改方法分離

  ParameterizeMethod參數化方法

  ReplaceParameterwithExplicitMethods用顯式方法代替參數

  PreserveWholeObject保持對象完整

  ReplaceParameterwithMethod用方法代替參數 

  IntroduceParameterObject引入參數對象

  RemoveSettingMethod去除設置方法 

  HideMethod隱藏方法 

  ReplaceConstructorwithFactoryMethod用工廠方法代替構造器

  EncapsulateDowncast封裝向下轉型 

  ReplaceErrorCodewithException用異常代替錯誤碼 

  ReplaceExceptionwithTest用測試代替異常


  Chapter11:DealingwithGeneralization處理泛化關係 

  PullUpField上移字段 

  PullUPMethod上移方法 

  PullUpConstructorBody上移構造器主體 

  PushDownMethod下移方法

  PushDownField下移字段 

  ExtractSubclass提取子類 

  ExtractSuperclass提取超類

  ExtractInterface提取接口

  CollapseHierarchy合併繼承層次 

  FormTemplateMethod形成TemplateMethod 

  ReplaceInheritancewithDelegation用委託代替繼承 

  ReplaceDelegationwithInheritance用繼承代替委託


  Chapter12:BigRefactorings(byKentBeckandMartinFowler)大型重構 

  TeaseApartInheritance分解繼承層次 

  ConvertProceduralDesigntoObjects將過程式設計轉換爲面向對象 

  SeparateDomainfromPresentation將領域邏輯與表現分離

  ExtractHierarchy提取繼承層次


  Chapter13:Refactoring,Reuse,andReality(byWilliamOpdyke)重構,複用與現實

  ARealityCheck現實的檢驗

  WhvAreDevelopersReluctanttoRefactorTheirPrograms?開發人員爲何不願重構程序

  ARealityCheck(Revisited)再談現實的檢驗

  ResourcesandReferencesforRefactoring重構的資源和參考文獻 

  ImplicationsRegardingSoftwareReuseandTechnologyTransfer對軟件複用與技術傳播的意義 

  AFinalNote結語 

  References參考文獻 


  Chapter14:RefactoringTools(byDonRobertsandJohnBrant)重構工具 

  RefactoringwithaTool使用工具重構

  TechnicalCriteriaforaRefactoringTool重構工具的技術標準 

  PracticalCriteriaforaRefactoringTool重構工具的實用標準

  WrapUp結語 


  Chapter15:PuttingItAllTogether(byKentBeck)集大成 

  References參考文獻 

  ListofSoundbites要點列表

  Updates更新內容 

  Index索引

發佈了49 篇原創文章 · 獲贊 17 · 訪問量 30萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章