2. Event-Driven Programming
What is an event ?
Events are things that happen in the system you are programming
— the system produces a signal of some kind when an event
occurs, and provides a mechanism by which an action can be
automatically taken (that is, some code running) when the event
occurs.
For example:
• The user selects, clicks, or hovers the cursor over a certain element.
• The user chooses a key on the keyboard.
• The user resizes or closes the browser window.
• A web page finishes loading.
• A form is submitted.
• A video is played, paused, or ends.
• An error occurs.
3. Event-Driven Programming
In computer programming ,event driven programming is a
programming in which the flow of the program is determined
by events such as user actions (mouse clicks, key presses),
sensor output or messages from the programs.
Event driven programming is the dominant used in graphical
user interface and other applications (eg: JavaScript web
applications)that are centered on performing certain actions
in response to user input.
4. A UI event loop, also known as a message loop or event
queue, is a fundamental part of the user interface (UI)
programming model.
It is a mechanism used by graphical user interface (GUI)
applications to handle user input and events in a responsive
and efficient manner.
In the UI event loop, the application waits for events such as
mouse clicks, key presses, or window resize events to occur.
When an event occurs, it is added to a queue, and the event
loop then processes each event one at a time, usually in the
order in which they were received.
5. Delegation in mobile application development refers to the
process of assigning a specific task or responsibility to another
object or component in the application.
Delegation is a common design pattern used in many
programming languages and frameworks, including mobile
app development.
delegation is often used to handle events and user interactions.
For example, a button in a mobile app may have a delegate
object assigned to it that handles the action of the button when
it is pressed.
The delegate object would contain the code that defines the
behavior of the button, such as navigating to a new screen or
submitting a form.
6. Notifications are a crucial aspect of mobile application development
that allow apps to communicate with users even when the app is not
actively in use.
Notifications can be used to inform users about important events,
remind them about upcoming appointments or deadlines, or simply
provide updates about the app itself.
To implement notifications in
mobile application
development, developers can use
platform-specific
APIs provided by iOS or Android.
These APIs allow developers to send
notifications to a device's notification
center or status bar.