Hi all,
I am preparing a presentation on APIs to technical writers.
Since I have been a programmer for years, of course I know everything back to front (so I thought), but when I got to the slide explaining "properties, methods and events", I realized for the first time that APIs don't "have events". Rather they have "event sensors". And for a while it was difficult to explain to myself the difference between methods and events (ok ... methods and event handlers).
I thought of presenting as the most basic example of an interface or object that possesses "properties, methods and events" is .. myself .. i.e. my own body and psyche. I have properties, e.g., my height and eye color (both read-only), and my weight (sort of read-write.
I have methods, e.g., I have hands that can move up and down and lift things etc. (The analogy is a bit weak for methods, I think: the methods of an API are invoked by an outside force and are involuntary of the objects offering the methods.)
And I have events, the stimuli I respond to ... or rather I have "event sensors". For the life of me I can't think of a better term than "event sensors" but it doesn't seem the best. What do I have? And what do APIs have? Isn't there an industry term for this?
And of course I have event handlers, i.e. my response to events actually occurring.
But I am still searching for some industry standard generic term for "event sensors". There is "event listeners", but I think that is specific to a certain language. And I think taht both terms don't quite capture the sense (no pun intended) and intent.
Thinking ... for the analogy of my own body, I think he most correct term is "event sensitivity". Very close to the concept of a "trigger". However, in human terms, I think events are analogue. On the other hand, there is a concept of "triggering an allergic reaction", for example. There is no "yes or no".
Computer events are definitely binary, ie they are triggered or not.
Answers and ideas from anybody?
Tia,
- avi
Start Free Trial