Industrial Logic Refactoring to Patterns Catalog Replace Hard-Coded Notifications with Observer

Replace Hard-Coded Notifications with Observer

Subclasses are hard-coded to notify a single instance of another class.

Remove the subclasses by making their superclass capable of notifying
one or more instances of any class that implements an Observer interface.

  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