Component-Based and Event-Driven Programming [Dev Concepts #6]

Share on facebook
Share on twitter
Share on linkedin
What is the difference between component-based and event-driven programming? Find out in this lesson!

In this tutorial, which is part of our Dev Concepts series, you will learn all about event-driven and component-based programming. 

In component-based programming, components are self-contained pieces of functionality, which are inserted as part of larger software application. Component-based software engineering is based on the composition of such reusable components.

Event-driven programming plays an important role in software components, which are typically events sources, which emit events. For example, a “button” component may emit a “button clicked” event, which is handled by the button owner.

Component events are intended to be consumed by the component owner, typically the app we are building. The event handling code for processing an event, coming from a component, is called “event handler”.

Component-based software development is a software development approach, a programming paradigm, based on the composition of reusable components.

  • Instead of building the application or system from scratch, developers take ready-to-use components and plug them into their software.
  • The components are building blocks, which come from component libraries and software packages (which can be open-source, royalty-free, or commercial).
Event-driven programming is a programming paradigm, in which the flow of the program is determined by eventssuch as mouse clicks, keypresses, button clicks, and many others.
 

If you are new to programming, make sure to watch our Free Full Java Basics course! It will give you the necessary foundation to build upon and become a successful software engineer!

Lesson Topics

In this video we review the following topics:
  • What Is Event-Driven Programming?
  • What Is Component-Based Programming?
  • Live Demo

Remember that coding is a skill, which should be practiced. To learn to code, you should write code, every day, for a long time. Watching tutorials is not enough. You should code! 

We would love to hear from you, so leave a comment below saying what topics you would like to see next. 

Leave a Comment

Scroll to Top
small_c_popup.png

Sign in

Don’t have an account? Register with us to join the community.