Criticism and Best Practice
Event-driven programming is widely used in graphical user interfaces because it has been adopted by most commercial widget toolkits as the model for interaction. The design of those toolkits has been criticized for promoting an over-simplified model of event-action, leading programmers to create error prone, difficult to extend and excessively complex application code:
Such an approach is fertile ground for bugs for at least two reasons:
- It can lead to writing code within the event handler for each possible value of various values in the program, making the source code hard to understand.
- In places where the event code changes variables shared throughout the program, it can require the programmer to write convoluted algorithms to avoid unwanted ripple effects.
Read more about this topic: Event-driven Programming
Famous quotes containing the words criticism and/or practice:
“Good criticism is very rare and always precious.”
—Ralph Waldo Emerson (18031882)
“The mayor and Montaigne have always been two, with a very clear separation. For all of being a lawyer or a financier, we must not ignore the knavery there is in such callings. An honest man is not accountable for the vice or stupidity of his trade, and should not therefore refuse to practice it.”
—Michel de Montaigne (15331592)