LiveWire Peer Support Network

Printable Version of Topic "Event Driven Programming"

- LiveWire Teen Forums & College Forums (http://www.golivewire.com)
-- (http://www.golivewire.com/forums/support-technical.html)
--- Programming & Application Development (http://www.golivewire.com/forums/forum-211-s-0.html)
---- Event Driven Programming (http://www.golivewire.com/forums/peer-yytytbt-support-a.html)


-- Posted by leon0213 at 5:47 am on Oct. 18, 2008

Hey, just doing some research work and part of my homework for college and I'm looking at event driven programming. Now I know what events are and I do know what event driven programming is.

My question is what is it typically used for? I mean I can think of ways it can be used within larger programs but is this really the main use, to be a smaller part of programs, or is there a way it is used for large programs itself?

Thank you for your help.


-- Posted by pleaseremove at 4:03 pm on Oct. 18, 2008

Umm, examples are pretty simple, could just be a button on a very simple application, or it could be some form of data poller which checks a certain location for a certain file and if it is there it does something like important it and process it.


-- Posted by Ethryx at 12:40 am on Oct. 31, 2008

Event Driven Programming is used for a lot of OS applications and some web applications. It basically allows for the flow of the program to be determined by user or program generated actions (mouse clicks, key presses, etc). In programs that are not event driven, the flow of the program will be from Start to Finish and never change no matter how many times it is ran. Also, the program will not continue to run unless the program is in some type of loop or waiting for user input. On the other hand, in a program that is Event-driven, the flow of the program can be different every time you run it since the flow is determined by events. The user could click Button A and then Button C which will trigger Event A. While another time, the user could click Button A and then Button B which would trigger Event B.

I personally like Event-driven programs, and they are usually the ones I program with, since they allow the flexibility that I am trying to achieve almost every time. Also, there are a lot of web-based applications now that are event driven, which is creating new possibilities in web-based development.


www.golivewire.com