Class 10 — Finish Regular expressions
— Drawing with the canvas object
— Domain Object Model & Javascript

Regular expression conclusion

To be determined from previous classes.

Drawing with the canvas object

You can draw on a page with Javascript using the Canvas element. Here are a couple of sites to help you learn about that element.

Here are some examples using the canvas element.

Domain object model

The Domain Object Model gives the structure within which it is possible to control all aspects of a web page using Javascript, as shown in the previous examples. It enables the implementation of the following principle.

Principle of reciprocity
Whatever a person can do with HTML and CSS in creating the contents of a web page, Javascript can do. And whatever Javascript can do in creating a web page, a person can do.

Of course, using Javascript has the advantage that a program can do things much faster than a person, which means pages can change in real-time.

DOM topics

Exam questions

Look at and become familiar with the exam instructions. exam instructions for class exams and the final examination.

Exam questions can be based on the following sources: (1) on-line web sites, (3) classes, (4) reports, (5) exercises, and (6) course web pages. They are based on topics from the beginning of the year up to and including the class before the exam, although more recent topics will be emphasized in later exams.

Consider all concepts and terminology used in on-line web sites, reports, slides and classes and ask the typical questions - how, why, when, where and what -- individually and in combination. In particular, variations are based on "describe", "explain", "define", "what is meant by", etc. you may be asked to do variations of some of the programming exercises.

Domain object model questions

A reference sheet will be given at the exam.
  1. Given an HTML file describe its Domain Object Model structure.
  2. Be able to use in a Javascript program the following DOM functions: createElement, createTextNode, innerHtml, childNodes, appendChild, insertBefore, replaceChild, removeChild, nextSibliing, previousSibling, parentNode, removeAttribute, setAttribute.