OOP - a question about database access
From: Tim (nocomment_at_rogers.com)
Date: 10/31/03
- Next message: H. S. Lahman: "Re: How to refactor duplicated code without using helper classes?"
- Previous message: Costin Cozianu: "Re: OO's best feature survey results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 18:49:07 GMT
If this is the wrong newsgroup, can someone please point me to the
correct one and disregard this.
I've been programming for 20 years but I'm trying to understand OOA and
OOD now. What I've decided to do is try to take a little database I have
that includes a table with a sports league's schedule and try to use
this to develop a little application to help me understand the concepts
and proper techniques of OOA, OOD and OOP.
The columns in the table are date, home team, visitor team and starting
time.
(I'm going to use Java in a JDeveloper environment and the database is
an MSAccess using a JDBC/ODBC bridge)
So, how would you divide the various functions regarding interfaces,
inheritance, etc.
Does the object that represents a game's information have the methods to
connect to the database, execute the query and retrieve the rows from
the resultset or are they done in the calling program or elsewhere? Does
each column have it's own get method or do you pass all of the game's
info to the calling class by a container once retrieved? Do you get all
rows of the result set from one call to the method of the object or do
you use a GetNextRow method and check a return code?
Are the rules for this hard and fast because I've looked around and
there doesn't seem to be anything definite considering this type of
thing must be fairly common.
- Next message: H. S. Lahman: "Re: How to refactor duplicated code without using helper classes?"
- Previous message: Costin Cozianu: "Re: OO's best feature survey results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|