Basic concept of Events & Events handlers is that, when some things special happens to an object,
others related objects are to be notified about that something special that is happened to first object.
By analyzing the WHAT has happened to first object, the second object execute some code that can ye any thing in Object oriented Programming. Usually we notify when
1. Some property of Object is changed
2. Some functionality is executed.
3. Some special condition occurs related to Object State.
The Event Subscriber object must be the alive and resident in the memory.
With Observer/Publish Subscriber/Mediator/Event Aggregator design patterns, we usually assume the static wiring of events and events handlers at the compile time.
But this complex wiring of events and event handlers can be added, modified and removed at the run time.
It is completely dynamic and even it can be injected as the dependency that describes how the events and event handlers can be wired at the application start up. According to application logic new objects can be created, they can hooked up to events of others objects; other objects can subscribe the events of newly created objects and so on. This is dynamic and can be changed according to the business logic or the domain logic of the application.
others related objects are to be notified about that something special that is happened to first object.
By analyzing the WHAT has happened to first object, the second object execute some code that can ye any thing in Object oriented Programming. Usually we notify when
1. Some property of Object is changed
2. Some functionality is executed.
3. Some special condition occurs related to Object State.
The Event Subscriber object must be the alive and resident in the memory.
With Observer/Publish Subscriber/Mediator/Event Aggregator design patterns, we usually assume the static wiring of events and events handlers at the compile time.
But this complex wiring of events and event handlers can be added, modified and removed at the run time.
It is completely dynamic and even it can be injected as the dependency that describes how the events and event handlers can be wired at the application start up. According to application logic new objects can be created, they can hooked up to events of others objects; other objects can subscribe the events of newly created objects and so on. This is dynamic and can be changed according to the business logic or the domain logic of the application.
No comments:
Post a Comment