Event driven vs sequential programming [closed]
Asked Answered
A

2

5

One of my friend recently had an argument in his team about the pros and cons of event driven programming vs sequential programming.

What are your views about it?

Aquinas answered 3/12, 2009 at 8:29 Comment(2)
Should be Community Wiki, as there is no real answer.Liebfraumilch
I don't know about there being no real answer. This isn't really an either-or conflict, despite how he phrased it. Each of these actually has a defined purpose which aren't really at odds with one another.Salman
S
11

Two different methods to support two different needs. If you have a problem driven by events, then you should use an event-driven methodology. If you need to perform procedures on defined data, but you're not worried about what's happening elsewhere, then obviously you want to use a more "sequential" style.

Note that typically, these two things are combined. A program's startup, shutdown, and maybe a main processing loop (say, a filter processor in an image app) will be largely sequential, while its UI layer and component interactions are event-driven.

Salman answered 3/12, 2009 at 8:35 Comment(0)
M
0

As I understand it:

Event driven design good for software that has to react to users requests/demands. Typically most GUI and online based software is like this as far as I can tell. It has no or little in the way of a predefined order of operation since the user can choose to do anything (within the scope of the app).

Sequential is more often found in batch processing. The software that runs with little or no user input. The order of operation is largely preset.

There's not a strict divide since GUI based tools can obviously include relatively long running batch processes.

Michelmichelangelo answered 3/12, 2009 at 8:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.