{"id":8520,"date":"2015-02-18T21:03:40","date_gmt":"2015-02-18T21:03:40","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=8520"},"modified":"2018-11-14T17:17:51","modified_gmt":"2018-11-14T17:17:51","slug":"programming-what-is-event-programming","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/programming-what-is-event-programming\/","title":{"rendered":"Programming:  what is event programming?"},"content":{"rendered":"<h1>In this post, the tutor speaks from experience, rather than formal education.<\/h1>\n<p>Event programming (aka, event-driven programming), as I understand, focuses on designing interfaces that react to user input.  What happens when the user clicks a button?  What happens when they press <span style=\"font-variant:small-caps\">enter<\/span>?  Specifying what should happen &#8211; then making sure it does &#8211; is event programming.<\/p>\n<p>You could pose the idea that video game programming was the first event-driven programming.  However, I&#8217;d argue that event programming as we know it today barely existed when I was in university (I got out in &#8217;95).  That&#8217;s because nowadays it seems inextricably connected with web design.<\/p>\n<p id=\"p0\" >\nThis post contains a little example of event-driven programming.  On the choice menu below, you can select a color, then click the button to change the text of this paragraph to the color you&#8217;ve chosen.<\/p>\n<table>\n<tr>\n<td>\n<select id=\"box\" ><option>pick a color<\/option><option value=\"forest green\" >green<\/option><option value=\"red\" >red<\/option><option value=\"peach\" >peach<\/option><option value=\"violet\" >violet<\/option><\/select>\n<\/td>\n<td>\n<span style=\"font-size:200%\">\u2192<\/span>\n<\/td>\n<td>\n<button id=\"bb\" style=\"background-color:#ffffff;border-style:solid;border-color:black;border-width:1px;color:#010101\" onclick=\"colorchange()\">Click to apply chosen color to text above.<\/button><\/td>\n<\/tr>\n<\/table>\n<p><script src=\"\/javascripts\/clrchoice.js\" type=\"text\/javascript\" language=\"javascript\"><\/script><\/p>\n<p>Event programming is often coded in Javascript.  It&#8217;s another computer language I&#8217;ll be discussing in future posts.<\/p>\n<p>PS:  Event programming is not to be confused with event <em>planning<\/em>, which is well beyond the tutor&#8217;s experience:)<\/p>\n<p>Source:  <a href=\"http:\/\/www.w3schools.com\/js\/default.asp\">w3schools.com<\/a><\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, the tutor speaks from experience, rather than formal education. Event programming (aka, event-driven programming), as I understand, focuses on designing interfaces that react to user input. What happens when the user clicks a button? What happens when &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/programming-what-is-event-programming\/\"> <span class=\"screen-reader-text\">Programming:  what is event programming?<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[526,205],"class_list":["post-8520","post","type-post","status-publish","format-standard","hentry","category-computer-science","tag-event-driven-programming","tag-javascript"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/8520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=8520"}],"version-history":[{"count":43,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/8520\/revisions"}],"predecessor-version":[{"id":36183,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/8520\/revisions\/36183"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=8520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=8520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=8520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}