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:
“To become aware in time when young of the advantages of age; to maintain the advantages of youth in old age: both are pure fortune.”
—Johann Wolfgang Von Goethe (17491832)
“A woman might claim to retain some of the childs faculties, although very limited and defused, simply because she has not been encouraged to learn methods of thought and develop a disciplined mind. As long as education remains largely induction ignorance will retain these advantages over learning and it is time that women impudently put them to work.”
—Germaine Greer (b. 1939)
“The return of the asymmetrical Saturday was one of those small events that were interior, local, almost civic and which, in tranquil lives and closed societies, create a sort of national bond and become the favorite theme of conversation, of jokes and of stories exaggerated with pleasure: it would have been a ready- made seed for a legendary cycle, had any of us leanings toward the epic.”
—Marcel Proust (18711922)