#native_company# #native_desc#
#native_cta#

The Benefits of Using Objects with Databases Page 5

By Sam Barnum
on 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
[email protected]

1
|
2
|
3
|
4
|
5