PHPBuilder - The Benefits of Using Objects with Databases Page 5



RSS Twitter
Articles Application Architecture

The Benefits of Using Objects with Databases - Page 5

by: Sam Barnum
|
May 9, 2003

Now that we have an abstract superclass (Record), we can move a lot of code out of the User class, and let the User subclass focus on User-specific items like accessors and validation methods. You may note that there is no SQL code in our Record classes. This is not an omission! The ObjectStore class (to be covered in part II) is responsible for all interaction with the database, and for the actual instantiation of our Record subclasses. This lets us keep our Record classes lean and efficient, which can be a big factor when you are dealing with many objects.
If you're interested in seeing the complete source code this article is based on (without all the syntax errors which are probably in this article), send me an email at sam@360works.com

« Previous Page
1
|
2
|
3
|
4
|
5

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Sam Barnum

Comment:



Comment:

(Maximum characters: 1200). You have characters left.