Refactoring

Páginas: 85 (21186 palabras) Publicado: 31 de enero de 2010
Refactoring To Patterns
version 1.13

Joshua Kerievsky joshua@industriallogic.com Industrial Logic, Inc. http://industriallogic.com

Refactoring To Patterns, Copyright © 2001, Joshua Kerievsky, Industrial Logic, Inc. All Rights Reserved.

Table of Contents
Introduction................................................................................................................................................... 5

Chain Constructors* .......................................................................................................... 6
Motivation .............................................................................................................................................. 7 Mechanics.............................................................................................................................................. 7 Example .................................................................................................................................................. 7

Replace Multiple Constructors with Creation Methods* ..... 9
Motivation.............................................................................................................................................. 9 Mechanics ............................................................................................................................................ 10 Example ................................................................................................................................................ 10 Parameterized Creation Methods.............................................................................................. 13

Encapsulate Subclasses with Creation Methods* ....................... 15
Motivation ............................................................................................................................................ 15 Mechanics............................................................................................................................................ 16 Example ................................................................................................................................................ 16

Extract Creation Class*................................................................................................ 18
Motivation............................................................................................................................................ 18 Mechanics ............................................................................................................................................ 19 Example................................................................................................................................................ 19

Replace Conditional Calculations with Strategy* ....................... 22
Motivation ............................................................................................................................................ 23 Mechanics............................................................................................................................................ 23 Example ................................................................................................................................................ 24

Replace Implicit Tree with Composite* .................................................... 31
Motivation............................................................................................................................................ 31 Mechanics ............................................................................................................................................ 32 Example ................................................................................................................................................ 32

Encapsulate Composite with Builder**...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Refactoring
  • Reingeniería y Refactoring de C-NUTRA v2.0

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS