0% found this document useful (0 votes)
11 views4 pages

Group Four Coursework

The document discusses event-driven programming, its features, applications, and differences from object-oriented programming. It provides details on event handlers, asynchronous execution, event loops, loose coupling, and event queues as key features of event-driven programming. Applications covered include GUIs, web development, networking, and embedded systems. Advantages include responsiveness, modularity, and scalability, while disadvantages are complexity, asynchrony issues, and difficulties in debugging and testing.

Uploaded by

byansi edrine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Group Four Coursework

The document discusses event-driven programming, its features, applications, and differences from object-oriented programming. It provides details on event handlers, asynchronous execution, event loops, loose coupling, and event queues as key features of event-driven programming. Applications covered include GUIs, web development, networking, and embedded systems. Advantages include responsiveness, modularity, and scalability, while disadvantages are complexity, asynchrony issues, and difficulties in debugging and testing.

Uploaded by

byansi edrine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

LIRA UNIVERSITY

FACULTY OF COMPUTING AND INFORMATION SCIENCES

DEPARTMENT OF COMPUTER SCIENCE

PROGRAM: BACHELOR OF SCIENCE IN COMPUTER SCIENCE

COURSE UNIT: LCS 3205 SOFTWARE EVOLUTION

LECTURER: MR. OMARA PATRICK

GROUP COURSE WORK

GROUP FOUR MEMBERS

NO Name Reg No Sign

1 ARINDA NABOTH 21/U/0460/LCS

2 21/U/0979/LCS
KYOMUHENDO ISIHAKA
3 21/U/0656/LCS/PS
AKELLO BRENDA ODONGO
4 21/U/0206/LCS/PS
BUA EMMANUEL
5 21/U/0459/LCS
SEMBATYA JORDAN

Event driven programming:


-features of event driven programming
-applications of event driven programming
- Difference between event driven programming and oriented driven programming
-advantages and disadvantages of event driven programming and oriented driven programming
Event-Driven Programming: Event-driven programming is a programming paradigm in which
the flow of the program is determined by events such as user actions (e.g., mouse clicks,
keypresses), system notifications (e.g., timer expiration, data arrival), or messages from other
programs or processes. In event-driven programming, the execution of the program is driven by
the occurrence of these events, and the program responds to them by invoking specific event
handlers or callbacks.

Features of Event-Driven Programming:


1. Event Handlers: In event-driven programming, code is organized around events such as
user actions (clicks, keypresses), system notifications, or data changes. Event handlers
are functions that are triggered when events occur.
2. Asynchronous Execution: Event-driven programming allows for asynchronous
execution, meaning that code can respond to events as they occur rather than waiting for
specific actions to complete.
3. Event Loop: Event-driven programming typically relies on an event loop, which
continuously listens for events and dispatches them to appropriate handlers.
4. Loose Coupling: Components in an event-driven system are loosely coupled, meaning
they can interact without direct dependencies, enhancing modularity and flexibility.
5. Event Queue: Events are often queued, allowing the system to handle them sequentially
or in priority order.
Applications of Event-Driven Programming:
1. Graphical User Interfaces (GUIs): Many GUI frameworks use event-driven
programming to handle user interactions such as button clicks, mouse movements, and
keyboard inputs.
2. Web Development: JavaScript, for example, employs event-driven programming
extensively for handling user interactions on web pages, such as form submissions and
AJAX requests.
3. Networking: Event-driven programming is widely used in networking applications for
handling events like data arrival, connection requests, and disconnections.
4. Embedded Systems: In embedded systems, event-driven programming is used to handle
interrupts from various sensors and devices.
Difference between Event-Driven Programming and Object-Oriented Programming
(OOP):
1. Paradigm Focus: Event-driven programming focuses on responding to events triggered
by user actions or system notifications. In contrast, object-oriented programming focuses
on modeling real-world entities as objects with properties and behaviors.
2. Control Flow: In event-driven programming, control flow is driven by events and
callbacks, whereas in OOP, it's typically controlled by method calls and object
interactions.
3. Loose Coupling vs. Encapsulation: Event-driven programming tends to promote loose
coupling between components, allowing them to interact without direct dependencies.
OOP, on the other hand, emphasizes encapsulation, where objects hide their internal state
and only expose necessary functionalities through well-defined interfaces.
Advantages and Disadvantages of Event-Driven Programming:
Advantages:
1. Responsiveness: Event-driven systems can respond quickly to user interactions or system
events without blocking other processes.
2. Modularity: Components in event-driven systems are loosely coupled, making it easier
to modify, replace, or extend functionality without affecting other parts of the system.
3. Scalability: Event-driven architectures can scale well since they can handle a large
number of concurrent events without much overhead.
Disadvantages:
1. Complexity: Event-driven systems can become complex, especially when dealing with a
large number of events and event handlers, leading to difficulties in understanding and
debugging.
2. Asynchrony Issues: Asynchronous programming can introduce challenges such as race
conditions, deadlocks, and callback hell, making code maintenance and debugging more
difficult.
3. Debugging and Testing: Testing and debugging event-driven code can be challenging
due to its asynchronous nature and complex event interactions.
Advantages and Disadvantages of Object-Oriented Programming:
Advantages:
1. Modularity: OOP promotes modularity by encapsulating data and behavior within
objects, making it easier to manage and maintain complex systems.
2. Reuse: OOP supports code reuse through inheritance and polymorphism, allowing
developers to extend existing functionality without rewriting code.
3. Abstraction: OOP allows developers to abstract complex systems into simpler, more
manageable objects, improving code organization and readability.
Disadvantages:
1. Overhead: Object-oriented systems can have overhead due to the need for managing
objects, inheritance hierarchies, and dynamic dispatch, which can impact performance.
2. Complexity: Object-oriented systems can become overly complex, especially with deep
inheritance hierarchies and tight coupling between objects, making it harder to
understand and maintain the code.
3. Learning Curve: OOP concepts such as inheritance, polymorphism, and encapsulation
can be challenging for beginners to grasp, leading to longer learning curves compared to
other programming paradigms.

You might also like