Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Event-driven programming
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Computer programming paradigm}} In [[computer programming]], '''event-driven programming''' is a [[programming paradigm]] in which the [[Control flow|flow of the program]] is determined by external [[Event (computing)|events]]. [[User interface|UI]] events from [[computer mouse|mice]], [[computer keyboard|keyboards]], [[touchpads]] and [[touchscreens]], and external [[sensor]] inputs are common cases. Events may also be programmatically generated, such as from [[message passing|messages from other programs]], notifications from other [[thread (computer science)|threads]], or other [[Computer network|network]] events. Event-driven programming is the dominant paradigm used in [[graphical user interface]]s applications and network servers. In an event-driven application, there is generally an [[event loop]] that listens for events and then triggers a [[callback (computer programming)|callback function]] when one of those events is detected. Event-driven programs can be written in any [[programming language]], although the task is easier in languages that provide [[abstraction (computer science)|high-level abstractions]]. Although they do not exactly fit the event-driven model, [[Interrupt handler|interrupt handling]] and [[exception handling]] have many similarities. It is important to differentiate between [[Event-driven messaging|event-driven]] and [[Message queue|message-driven (aka queue driven)]] paradigms: Event-driven services (e.g. [[Amazon Simple Notification Service|AWS SNS]]) are decoupled from their consumers. Whereas queue / message driven services (e.g. [[Amazon Simple Queue Service|AWS SQS]]) are coupled with their consumers.<ref>{{Cite book |title=Domain-Driven Design with Java - A Practitioner's Guide |year=2022 |isbn=9781800564763 |last1=Chandrasekaran |first1=Premanand |last2=Krishnan |first2=Karthik |last3=Ford |first3=Neal |last4=Byars |first4=Brandon |last5=Buijze |first5=Allard |publisher=Packt Publishing }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)