Bryan,

My question is in regards to the differences between

newJob.name = form.name;
newJob.insertJob();

and

newJob.insertJob(name=form.name);

What are the differences between the two? Which is "better"?

In the first form, your instance variables are public, not private.  A lot of 
OOP types do not like this.  There are some good reasons for not doing this, 
but no law about it.

The second method would allow the instance variables to all be private, in the 
variables scope.  This is definitely preferred by a lot of developers.


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 |   |
---------  Binary Soduko
|   |   |
---------
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232633
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to