[WEBINAR] Application Acceleration: Faster Performance for End Users


Definition - What does Event mean?

An event is an action launched by an external hardware device and manipulated by software code. Events allow objects to notify client objects about important activities. Events provide tremendous flexibility compared to traditional console applications, which follow a rigid execution path and are limited by hard wiring. Unlike fields, events are members of an interface.

A class sending an event message is the publisher. A class receiving the event is the subscriber. Events may only be invoked from their declared classes, which requires modifier declaration (for example, protected virtual) enabling derived class access.

Techopedia explains Event

Programs apply event-driven code as external asynchronous changes occur. For example, a user pressing a keyboard button causes an external change requiring a response from its software. The triggered event is either external hardware or software. When a program indicates it is ready to react, the event is redirected to the event handler software module.

Optionally, a program may ignore and redirect events to available handlers. Triggered hardware or software event data are event type indicators, but data like precise event time or extra data affects final event handler response.

Events are always considered when hardware converts external user actions into specific event code, especially during user interface design and manufacturing.

Program event handlers are often synchronous, where one or more program code modules are dedicated to event handling. Common event sources are:

  • User interfacing hardware
  • Interrupting external software event, such as a timer

Event-driven interactive software alters responses according to events.

Event subscription implementation steps are:

  • Event Declaration: This includes delegate (event handler) declaration with required argument set and access modifier.
  • Event Invocation: Code is written when the client hooks up the event to a delegate.
  • Hooking Up to Events: To hookup from outside an event's declared class, a newly created delegate instance is added to the event field with the “+=” operator.

One event may be published by multiple publishers. One subscriber may handle multiple publisher events. When multiple subscribers are registered for a single event, handlers are invoked synchronously.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.