eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak


Introduction to Web Programming

  • 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
Eye ColorCan Purr
Number of legsCatches mice
SpeciesRips 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
SizeOpen Drop Down Box
Selection PolicySelect an Item
List of ItemsClose Drop Down Box

Previous Page |Next Page