Industrial Logic Refactoring to Patterns Catalog Replace State-Altering Conditionals with State

Replace State-Altering Conditionals with State

The conditional expressions that control
an object's state transitions are complex.

Replace the conditionals with State classes that handle
specific states and transitions between them.

  Industrial Logic, Inc.

 
Refactorings
· Chain Constructors
· Compose Method
· Encapsulate Classes with Factory
· Encapsulate Composite with Builder
· Extract Adapter
· Extract Composite
· Extract Parameter
· Form Template Method
· Inline Singleton
· Introduce Null Object
· Introduce Polymorphic Creation with Factory Method
· Limit Instantiation with Singleton
· Move Accumulation to Collecting Parameter
· Move Accumulation to Visitor
· Move Creation Knowledge to Factory
· Move Embellishment to Decorator
· Replace Conditional Dispatacher with Command
· Replace Conditional Logic with Strategy
· Replace Constructors with Creation Methods
· Replace Hard-Coded Notifications with Observer
· Replace Implicit Language with Interpreter
· Replace Implicit Tree with Composite
· Replace One/Many Distinctions with Composite
· Replace State-Altering Conditionals with State
· Replace Type Code with Class
· Unify Interfaces
· Unify Interfaces with Adapter


FacebookFacebook  TwitterTwitter  linked inLinkedIn