Advantages of XML Events
XML Events uses a separation of concerns design pattern, and is technology-neutral with regard to handlers. It gives authors freedom in organizing their code and allows separation of document content from scripting.
Legacy HTML and early SVG versions bind events to presentation elements by encoding the event name in an attribute name, such that the value of the attribute is the action for that event at that element. For example (with Javascript’s onclick attribute):
Stay here!
This design has three drawbacks:
- it hard-wires the events into the language, so that adding new event types requires changes to the language
- it forces authors to mix the content of the document with the specifications of the scripting and event handling, rather than allowing them to separate them.
- it restricts authors to a single scripting language per document.
Read more about this topic: XML Events
Famous quotes containing the words advantages of, advantages and/or events:
“When the manipulations of childhood are a little larceny, they may grow and change with the child into qualities useful and admire in the grown-up world. When they are the futile struggle for love and concern and protection, they may become the warped and ruthless machinations of adults who seek in the advantages of power what they could never win as children.”
—Leontine Young (20th century)
“In 1845 he built himself a small framed house on the shores of Walden Pond, and lived there two years alone, a life of labor and study. This action was quite native and fit for him. No one who knew him would tax him with affectation. He was more unlike his neighbors in his thought than in his action. As soon as he had exhausted himself that advantages of his solitude, he abandoned it.”
—Ralph Waldo Emerson (18031882)
“The phenomenon of nature is more splendid than the daily events of nature, certainly, so then the twentieth century is splendid.”
—Gertrude Stein (18741946)