Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Objects

September 28, 1998

OOP is based around the concept of objects. Objects are little black boxes of functionality that are fully independent of any code that references or uses them.

Objects can be thought of as exhibiting two characteristics. Objects have properties and objects have methods.

Properties describe the qualities of an object while methods specify the object's behavior.

The typical "introduction to objects" chapter will give you an example something like this:

The Cat Object
Properties Methods
Eye Color Can Purr
Number of legs Catches mice
Species Rips up the couch

Although this is not a perfect analogy, sometimes when I am trying to figure out what an object looks like, I think of objects in terms of nouns, properties in terms of adjectives, and methods in terms of verbs.

However, let's consider a more realistic object that you might have to deal with in your code. Let's consider the HTML FORM "Select Box" object that we discussed on Day One and which is shown below as a reminder:

If you recall, a Select Box object has several properties.

For one, Select Boxes have a SIZE that corresponds to the number of visible selections. Select Boxes also can be set to allow either multiple or single selections. Finally, Select Boxes have a list of OPTIONS that are tied to an administratively-defined NAME.

Meanwhile, Select Boxes have methods.

For example, a select box knows how to create its popup list when a user clicks on the down arrow. Also, if a user selects an item from the popup list, the select box knows how to select that item. Further, the Select Box knows how to close the popup box when a user selects an item.

The table below presents a quick reference to our select box object.

The Select Box Object
Properties Methods
Size Open Drop Down Box
Selection Policy Select an Item
List of Items Close Drop Down Box

Object-Oriented Programming
Introduction to Perl 5 | Table of Contents
Encapsulation



Up to => Home / Authoring / Languages / Perl / 5




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers