View Single Post
Old 07-23-2008, 09:57 PM   #14 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Nice work m8.
Quote:
These variables are called class member variables and you may set a value to them when defining them.
While this may be partly true, they are not bound to a specific name, many people call them object properties or just variables or even attributes, all are valid in my mind. There is nothing mystical about it, they are variables and related functions encapsulated within the instantiated object's (or class's if they are bound to the class like a static) namespace.
Quote:
Classes are objects which contain methods, member variables, are able to be inherited and much more, objects make our life as developers easier by cutting down on repetitive code.
Not to flog an already dying horse here but I think this point needs stressing, classes are anything but objects they are merely blueprints to an object, much like an architects plans to your house, hence why the 'new' keyword followed by the class name is used to create objects of that class type and the scope resolution operator '::' for static or function/variables bound to the class (i.e. not an object).

Whilst it may be good to be 'technical' and 'picky' about names of class/object functions/variables for a basic tutorial I hardly think its necessary and can be confusing for a new OOP'er to start abstracting names for functions (remember they are still declared using 'function') for a tutorial of this scope its unhelpful.


Aslong as the basic facts are underlined and understood by the reader its done its job.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote