Introduction To Object Speak
An object in simple computing terms can best be described as follows:
- An object has properties: a colour is a property.
- An object has methods: a method allows an object to be
told to do something, for example, open up a window, or display
a yes/no dialog box.
- An object has events: it allows the object to tell the
outside world that it has something to say about itself, should
anybody be interested. For example a checkbox would "fire
an event" were it to be checked or unchecked.
- objects can contain other objects. For example a color can be
considered as an object, composed of Red Green and Blue properties.
- Methods are usually used to do perform some action. Some methods
"return" a value or object (as explained in the discussion
- Methods and events pass parameters. For example the window.open()
method has parameters to specify what the window should look like
(width, height ...).
There's a lot more to object oriented programming, but we'll skip
the part where confusion usually sets in, it's easier to pick things
up when they are needed.
The "object hierarchy" described here is extremely important.
- Parent, Frames, Self, Top
- Elements (text fields, textarea, checkbox, password, radio,
select, button, submit, reset)
There are many more objects to peruse at your convenience. A good
reference site is none other than Netscape's own reference